我是想把导出的excel表直接再vfp中处理成可直接打印的样式,所以有这需求,呵呵
按格式应该是eole.Cells.REPLACE("0","",xlwhole)这样
xlWhole不能直接用上,折腾了好久没解决,刚发现这里是需要用Excel常量单元的
xlWhole 的常量单元式 1
也就是说eole.Cells.REPLACE("0","",1) 就解决了 单元格匹配问题了。
(自己解决了,帖子怎么处理来着??)
下面是搜到的Delphi Excel常量单元 好像是通用的,在这里记录下
xlBetween = 1;
xlEqual = 3;
xlGreater = 5;
xlGreaterEqual = 7;
xlLess = 6;
xlLessEqual = 8;
xlNotBetween = 2;
xlNotEqual = 4;
xlCellValue = 1;
xlExpression = 2;
xlButtonControl = 0;
xlCheckBox = 1;
xlDropDown = 2;
xlEditBox = 3;
xlGroupBox = 4;
xlLabel = 5;
xlListBox = 6;
xlOptionButton = 7;
xlScrollBar = 8;
xlSpinner = 9;
xlColumnLabels = 2;
xlMixedLabels = 3;
xlNoLabels = -4142;
xlRowLabels = 1;
xlHAlignCenter = -4108;
xlHAlignCenterAcrossSelection = 7;
xlHAlignDistributed = -4117;
xlHAlignFill = 5;
xlHAlignGeneral = 1;
xlHAlignJustify = -4130;
xlHAlignLeft = -4131;
xlHAlignRight = -4152;
xlHebrewFullScript = 0;
xlHebrewMixedAuthorizedScript = 3;
xlHebrewMixedScript = 2;
xlHebrewPartialScript = 1;
xlAllChanges = 2;
xlNotYetReviewed = 3;
xlSinceMyLastSave = 1;
xlHtmlCalc = 1;
xlHtmlChart = 3;
xlHtmlList = 2;
xlHtmlStatic = 0;
xlIMEModeAlpha = 8;
xlIMEModeAlphaFull = 7;
xlIMEModeDisable = 3;
xlIMEModeHangul = 10;
xlIMEModeHangulFull = 9;
xlIMEModeHiragana = 4;
xlIMEModeKatakana = 5;
xlIMEModeKatakanaHalf = 6;
xlIMEModeNoControl = 0;
xlIMEModeOff = 2;
xlIMEModeOn = 1;
xlPivotTableReport = 1;
xlQueryTable = 0;
xlFormatFromLeftOrAbove = 0;
xlFormatFromRightOrBelow = 1;
xlShiftDown = -4121;
xlShiftToRight = -4161;
xlOutline = 1;
xlTabular = 0;
xlLegendPositionBottom = -4107;
xlLegendPositionCorner = 2;
xlLegendPositionLeft = -4131;
xlLegendPositionRight = -4152;
xlLegendPositionTop = -4160;
xlContinuous = 1;
xlDash = -4115;
xlDashDot = 4;
xlDashDotDot = 5;
xlDot = -4118;
xlDouble = -4119;
xlLineStyleNone = -4142;
xlSlantDashDot = 13;
xlExcelLinks = 1;
xlOLELinks = 2;
xlPublishers = 5;
xlSubscribers = 6;
xlEditionDate = 2;
xlLinkInfoStatus = 3;
xlUpdateState = 1;
xlLinkInfoOLELinks = 2;
xlLinkInfoPublishers = 5;
xlLinkInfoSubscribers = 6;
xlLinkStatusCopiedValues = 10;
xlLinkStatusIndeterminate = 5;
xlLinkStatusInvalidName = 7;
xlLinkStatusMissingFile = 1;
xlLinkStatusMissingSheet = 2;
xlLinkStatusNotStarted = 6;
xlLinkStatusOK = 0;
xlLinkStatusOld = 3;
xlLinkStatusSourceNotCalculated = 4;
xlLinkStatusSourceNotOpen = 8;
xlLinkStatusSourceOpen = 9;
xlLinkTypeExcelLinks = 1;
xlLinkTypeOLELinks = 2;
xlListConflictDialog = 0;
xlListConflictDiscardAllConflicts = 2;
xlListConflictError = 3;
xlListConflictRetryAllConflicts = 1;
xlListDataTypeCheckbox = 9;
xlListDataTypeChoice = 6;
xlListDataTypeChoiceMulti = 7;
xlListDataTypeCounter = 11;
xlListDataTypeCurrency = 4;
xlListDataTypeDateTime = 5;
xlListDataTypeHyperLink = 10;
xlListDataTypeListLookup = 8;
xlListDataTypeMultiLineRichText = 12;
xlListDataTypeMultiLineText = 2;
xlListDataTypeNone = 0;
xlListDataTypeNumber = 3;
xlListDataTypeText = 1;
xlSrcExternal = 0;
xlSrcRange = 1;
xlSrcXml = 2;
xlColumnHeader = -4110;
xlColumnItem = 5;
xlDataHeader = 3;
xlDataItem = 7;
xlPageHeader = 2;
xlPageItem = 6;
xlRowHeader = -4153;
xlRowItem = 4;
xlTableBody = 8;
xlPart = 2;
xlWhole = 1;
xlMAPI = 1;
xlNoMailSystem = 0;
xlPowerTalk = 2;
xlMarkerStyleAutomatic = -4105;
xlMarkerStyleCircle = 8;
xlMarkerStyleDash = -4115;
xlMarkerStyleDiamond = 2;
xlMarkerStyleDot = -4118;
xlMarkerStyleNone = -4142;
xlMarkerStylePicture = -4147;
xlMarkerStylePlus = 9;
xlMarkerStyleSquare = 1;
xlMarkerStyleStar = 5;
xlMarkerStyleTriangle = 3;
xlMarkerStyleX = -4168;
xlNoButton = 0;
xlPrimaryButton = 1;
xlSecondaryButton = 2;
xlDefault = -4143;
xlIBeam = 3;
xlNorthwestArrow = 1;
xlWait = 2;
xlMicrosoftAccess = 4;
xlMicrosoftFoxPro = 5;
xlMicrosoftMail = 3;
xlMicrosoftPowerPoint = 2;
xlMicrosoftProject = 6;
xlMicrosoftSchedulePlus = 7;
xlMicrosoftWord = 1;
xlFitToPage = 2;
xlFullPage = 3;
xlScreenSize = 1;
xlOLEControl = 2;
xlOLEEmbed = 1;
xlOLELink = 0;
xlVerbOpen = 2;
xlVerbPrimary = 1;
xlDownThenOver = 1;
xlOverThenDown = 2;
xlDownward = -4170;
xlHorizontal = -4128;
xlUpward = -4171;
xlVertical = -4166;
xlPageBreakAutomatic = -4105;
xlPageBreakManual = -4135;
xlPageBreakNone = -4142;
xlPageBreakFull = 1;
xlPageBreakPartial = 2;
xlLandscape = 2;
xlPortrait = 1;
xlPaper10x14 = 16;
xlPaper11x17 = 17;
xlPaperA3 = 8;
xlPaperA4 = 9;
xlPaperA4Small = 10;
xlPaperA5 = 11;
xlPaperB4 = 12;
xlPaperB5 = 13;
xlPaperCsheet = 24;
xlPaperDsheet = 25;
xlPaperEnvelope10 = 20;
xlPaperEnvelope11 = 21;
xlPaperEnvelope12 = 22;
xlPaperEnvelope14 = 23;
xlPaperEnvelope9 = 19;
xlPaperEnvelopeB4 = 33;
xlPaperEnvelopeB5 = 34;
xlPaperEnvelopeB6 = 35;
xlPaperEnvelopeC3 = 29;
xlPaperEnvelopeC4 = 30;
xlPaperEnvelopeC5 = 28;
xlPaperEnvelopeC6 = 31;
xlPaperEnvelopeC65 = 32;
xlPaperEnvelopeDL = 27;
xlPaperEnvelopeItaly = 36;
xlPaperEnvelopeMonarch = 37;
xlPaperEnvelopePersonal = 38;
xlPaperEsheet = 26;
xlPaperExecutive = 7;
xlPaperFanfoldLegalGerman = 41;
xlPaperFanfoldStdGerman = 40;
xlPaperFanfoldUS = 39;
xlPaperFolio = 14;
xlPaperLedger = 4;
xlPaperLegal = 5;
xlPaperLetter = 1;
xlPaperLetterSmall = 2;
xlPaperNote = 18;
xlPaperQuarto = 15;
xlPaperStatement = 6;
xlPaperTabloid = 3;
xlPaperUser = 256;
xlParamTypeBigInt = -5;
xlParamTypeBinary = -2;
xlParamTypeBit = -7;
xlParamTypeChar = 1;
xlParamTypeDate = 9;
xlParamTypeDecimal = 3;
xlParamTypeDouble = 8;
xlParamTypeFloat = 6;
xlParamTypeInteger = 4;
xlParamTypeLongVarBinary = -4;
xlParamTypeLongVarChar = -1;
xlParamTypeNumeric = 2;
xlParamTypeReal = 7;
xlParamTypeSmallInt = 5;
xlParamTypeTime = 10;
xlParamTypeTimestamp = 11;
xlParamTypeTinyInt = -6;
xlParamTypeUnknown = 0;
xlParamTypeVarBinary = -3;
xlParamTypeVarChar = 12;
xlParamTypeWChar = -8;
xlConstant = 1;
xlPrompt = 0;
xlRange = 2;
xlPasteSpecialOperationAdd = 2;
xlPasteSpecialOperationDivide = 5;
xlPasteSpecialOperationMultiply = 4;
xlPasteSpecialOperationNone = -4142;
xlPasteSpecialOperationSubtract = 3;
xlPasteAll = -4104;
xlPasteAllExceptBorders = 7;
xlPasteColumnWidths = 8;
xlPasteComments = -4144;
xlPasteFormats = -4122;
xlPasteFormulas = -4123;
xlPasteFormulasAndNumberFormats = 11;
xlPasteValidation = 6;
xlPasteValues = -4163;
xlPasteValuesAndNumberFormats = 12;
xlPatternAutomatic = -4105;
xlPatternChecker = 9;
xlPatternCrissCross = 16;
xlPatternDown = -4121;
xlPatternGray16 = 17;
xlPatternGray25 = -4124;
xlPatternGray50 = -4125;
xlPatternGray75 = -4126;
xlPatternGray8 = 18;
xlPatternGrid = 15;
xlPatternHorizontal = -4128;
xlPatternLightDown = 13;
xlPatternLightHorizontal = 11;
xlPatternLightUp = 14;
xlPatternLightVertical = 12;
xlPatternNone = -4142;
xlPatternSemiGray75 = 10;
xlPatternSolid = 1;
xlPatternUp = -4162;
xlPatternVertical = -4166;
xlPhoneticAlignCenter = 2;
xlPhoneticAlignDistributed = 3;
xlPhoneticAlignLeft = 1;
xlPhoneticAlignNoControl = 0;
xlHiragana = 2;
xlKatakana = 1;
xlKatakanaHalf = 0;
xlNoConversion = 3;
xlPrinter = 2;
xlScreen = 1;
xlBMP = 1;
xlCGM = 7;
xlDRW = 4;
xlDXF = 5;
xlEPS = 8;
xlHGL = 6;
xlPCT = 13;
xlPCX = 10;
xlPIC = 11;
xlPLT = 12;
xlTIF = 9;
xlWMF = 2;
xlWPG = 3;
xlPivotCellBlankCell = 9;
xlPivotCellCustomSubtotal = 7;
xlPivotCellDataField = 4;
xlPivotCellDataPivotField = 8;
xlPivotCellGrandTotal = 3;
xlPivotCellPageFieldItem = 6;
xlPivotCellPivotField = 5;
xlPivotCellPivotItem = 1;
xlPivotCellSubtotal = 2;
xlPivotCellValue = 0;
xlDifferenceFrom = 2;
xlIndex = 9;
xlNoAdditionalCalculation = -4143;
xlPercentDifferenceFrom = 4;
xlPercentOf = 3;
xlPercentOfColumn = 7;
xlPercentOfRow = 6;
xlPercentOfTotal = 8;
xlRunningTotal = 5;
xlDate = 2;
xlNumber = -4145;
xlText = -4158;
xlColumnField = 2;
xlDataField = 4;
xlHidden = 0;
xlPageField = 3;
xlRowField = 1;
xlPTClassic = 20;
xlPTNone = 21;
xlReport1 = 0;
xlReport10 = 9;
xlReport2 = 1;
xlReport3 = 2;
xlReport4 = 3;
xlReport5 = 4;
xlReport6 = 5;
xlReport7 = 6;
xlReport8 = 7;
xlReport9 = 8;
xlTable1 = 10;
xlTable10 = 19;
xlTable2 = 11;
xlTable3 = 12;
xlTable4 = 13;
xlTable5 = 14;
xlTable6 = 15;
xlTable7 = 16;
xlTable8 = 17;
xlTable9 = 18;
xlMissingItemsDefault = -1;
xlMissingItemsMax = 32500;
xlMissingItemsNone = 0;
xlConsolidation = 3;
xlDatabase = 1;
xlExternal = 2;
xlPivotTable = -4148;
xlScenario = 4;
xlPivotTableVersion10 = 1;
xlPivotTableVersion2000 = 0;
xlPivotTableVersionCurrent = -1;
xlFreeFloating = 3;
xlMove = 2;
xlMoveAndSize = 1;
xlMacintosh = 1;
xlMSDOS = 3;
xlWindows = 2;
xlPrintErrorsBlank = 1;
xlPrintErrorsDash = 2;
xlPrintErrorsDisplayed = 0;
xlPrintErrorsNA = 3;
xlPrintInPlace = 16;
xlPrintNoComments = -4142;
xlPrintSheetEnd = 1;
xlPriorityHigh = -4127;
xlPriorityLow = -4134;
xlPriorityNormal = -4143;
xlBlanks = 4;
xlButton = 15;
xlDataAndLabel = 0;
xlDataOnly = 2;
xlFirstRow = 256;
xlLabelOnly = 1;
xlOrigin = 3;
xlADORecordset = 7;
xlDAORecordset = 2;
xlODBCQuery = 1;
xlOLEDBQuery = 5;
xlTextImport = 6;
xlWebQuery = 4;
xlRangeAutoFormat3DEffects1 = 13;
xlRangeAutoFormat3DEffects2 = 14;
xlRangeAutoFormatAccounting1 = 4;
xlRangeAutoFormatAccounting2 = 5;
xlRangeAutoFormatAccounting3 = 6;
xlRangeAutoFormatAccounting4 = 17;
xlRangeAutoFormatClassic1 = 1;
xlRangeAutoFormatClassic2 = 2;
xlRangeAutoFormatClassic3 = 3;
xlRangeAutoFormatClassicPivotTable = 31;
xlRangeAutoFormatColor1 = 7;
xlRangeAutoFormatColor2 = 8;
xlRangeAutoFormatColor3 = 9;
xlRangeAutoFormatList1 = 10;
xlRangeAutoFormatList2 = 11;
xlRangeAutoFormatList3 = 12;
xlRangeAutoFormatLocalFormat1 = 15;
xlRangeAutoFormatLocalFormat2 = 16;
xlRangeAutoFormatLocalFormat3 = 19;
xlRangeAutoFormatLocalFormat4 = 20;
xlRangeAutoFormatNone = -4142;
xlRangeAutoFormatPTNone = 42;
xlRangeAutoFormatReport1 = 21;
xlRangeAutoFormatReport10 = 30;
xlRangeAutoFormatReport2 = 22;
xlRangeAutoFormatReport3 = 23;
xlRangeAutoFormatReport4 = 24;
xlRangeAutoFormatReport5 = 25;
xlRangeAutoFormatReport6 = 26;
xlRangeAutoFormatReport7 = 27;
xlRangeAutoFormatReport8 = 28;
xlRangeAutoFormatReport9 = 29;
xlRangeAutoFormatSimple = -4154;
xlRangeAutoFormatTable1 = 32;
xlRangeAutoFormatTable10 = 41;
xlRangeAutoFormatTable2 = 33;
xlRangeAutoFormatTable3 = 34;
xlRangeAutoFormatTable4 = 35;
xlRangeAutoFormatTable5 = 36;
xlRangeAutoFormatTable6 = 37;
xlRangeAutoFormatTable7 = 38;
xlRangeAutoFormatTable8 = 39;
xlRangeAutoFormatTable9 = 40;
xlRangeValueDefault = 10;
xlRangeValueMSPersistXML = 12;
xlRangeValueXMLSpreadsheet = 11;
xlA1 = 1;
xlR1C1 = -4150;
xlAbsolute = 1;
xlAbsRowRelColumn = 2;
xlRelative = 4;
xlRelRowAbsColumn = 3;
xlAlways = 1;
xlAsRequired = 0;
xlNever = 2;
xlAllAtOnce = 2;
xlOneAfterAnother = 1;
xlNotYetRouted = 0;
xlRoutingComplete = 2;
xlRoutingInProgress = 1;
xlColumns = 2;
xlRows = 1;
xlAutoActivate = 3;
xlAutoClose = 2;
xlAutoDeactivate = 4;
xlAutoOpen = 1;
xlDoNotSaveChanges = 2;
xlSaveChanges = 1;
xlExclusive = 3;
xlNoChange = 1;
xlShared = 2;
xlLocalSessionChanges = 2;
xlOtherSessionChanges = 3;
xlUserResolution = 1;
xlScaleLinear = -4132;
xlScaleLogarithmic = -4133;
xlNext = 1;
xlPrevious = 2;
xlByColumns = 2;
xlByRows = 1;
xlWithinSheet = 1;
xlWithinWorkbook = 2;
xlChart = -4109;
xlDialogSheet = -4116;
xlExcel4IntlMacroSheet = 4;
xlExcel4MacroSheet = 3;
xlWorksheet = -4167;
xlSheetHidden = 0;
xlSheetVeryHidden = 2;
xlSheetVisible = -1;
xlSizeIsArea = 1;
xlSizeIsWidth = 2;
xlSmartTagControlActiveX = 13;
xlSmartTagControlButton = 6;
xlSmartTagControlCheckbox = 9;
xlSmartTagControlCombo = 12;
xlSmartTagControlHelp = 3;
xlSmartTagControlHelpURL = 4;
xlSmartTagControlImage = 8;
xlSmartTagControlLabel = 7;
xlSmartTagControlLink = 2;
xlSmartTagControlListbox = 11;
xlSmartTagControlRadioGroup = 14;
xlSmartTagControlSeparator = 5;
xlSmartTagControlSmartTag = 1;
xlSmartTagControlTextbox = 10;
xlButtonOnly = 2;
xlDisplayNone = 1;
xlIndicatorAndButton = 0;
xlSortNormal = 0;
xlSortTextAsNumbers = 1;
xlPinYin = 1;
xlStroke = 2;
xlCodePage = 2;
xlSyllabary = 1;
xlAscending = 1;
xlDescending = 2;
xlSortColumns = 1;
xlSortRows = 2;
xlSortLabels = 2;
xlSortValues = 1;
xlSourceAutoFilter = 3;
xlSourceChart = 5;
xlSourcePivotTable = 6;
xlSourcePrintArea = 2;
xlSourceQuery = 7;
xlSourceRange = 4;
xlSourceSheet = 1;
xlSourceWorkbook = 0;
xlSpeakByColumns = 1;
xlSpeakByRows = 0;
xlErrors = 16;
xlLogical = 4;
xlNumbers = 1;
xlTextValues = 2;
xlSubscribeToPicture = -4147;
xlSubscribeToText = -4158;
xlAtBottom = 2;
xlAtTop = 1;
xlSummaryOnLeft = -4131;
xlSummaryOnRight = -4152;
xlStandardSummary = 1;
xlSummaryPivotTable = -4148;
xlSummaryAbove = 0;
xlSummaryBelow = 1;
xlTabPositionFirst = 0;
xlTabPositionLast = 1;
xlDelimited = 1;
xlFixedWidth = 2;
xlTextQualifierDoubleQuote = 1;
xlTextQualifierNone = -4142;
xlTextQualifierSingleQuote = 2;
xlTextVisualLTR = 1;
xlTextVisualRTL = 2;
xlTickLabelOrientationAutomatic = -4105;
xlTickLabelOrientationDownward = -4170;
xlTickLabelOrientationHorizontal = -4128;
xlTickLabelOrientationUpward = -4171;
xlTickLabelOrientationVertical = -4166;
xlTickLabelPositionHigh = -4127;
xlTickLabelPositionLow = -4134;
xlTickLabelPositionNextToAxis = 4;
xlTickLabelPositionNone = -4142;
xlTickMarkCross = 4;
xlTickMarkInside = 2;
xlTickMarkNone = -4142;
xlTickMarkOutside = 3;
xlDays = 0;
xlMonths = 1;
xlYears = 2;
xlNoButtonChanges = 1;
xlNoChanges = 4;
xlNoDockingChanges = 3;
xlNoShapeChanges = 2;
xlToolbarProtectionNone = -4143;
xlTotalsCalculationAverage = 2;
xlTotalsCalculationCount = 3;
xlTotalsCalculationCountNums = 4;
xlTotalsCalculationMax = 6;
xlTotalsCalculationMin = 5;
xlTotalsCalculationNone = 0;
xlTotalsCalculationStdDev = 7;
xlTotalsCalculationSum = 1;
xlTotalsCalculationVar = 8;
xlExponential = 5;
xlLinear = -4132;
xlLogarithmic = -4133;
xlMovingAvg = 6;
xlPolynomial = 3;
xlPower = 4;
xlUnderlineStyleDouble = -4119;
xlUnderlineStyleDoubleAccounting = 5;
xlUnderlineStyleNone = -4142;
xlUnderlineStyleSingle = 2;
xlUnderlineStyleSingleAccounting = 4;
xlUpdateLinksAlways = 3;
xlUpdateLinksNever = 2;
xlUpdateLinksUserSetting = 1;
xlVAlignBottom = -4107;
xlVAlignCenter = -4108;
xlVAlignDistributed = -4117;
xlVAlignJustify = -4130;
xlVAlignTop = -4160;
xlWBATChart = -4109;
xlWBATExcel4IntlMacroSheet = 4;
xlWBATExcel4MacroSheet = 3;
xlWBATWorksheet = -4167;
xlWebFormattingAll = 1;
xlWebFormattingNone = 3;
xlWebFormattingRTF = 2;
xlAllTables = 2;
xlEntirePage = 1;
xlSpecifiedTables = 3;
xlMaximized = -4137;
xlMinimized = -4140;
xlNormal = -4143;
xlChartAsWindow = 5;
xlChartInPlace = 4;
xlClipboard = 3;
xlInfo = -4129;
xlWorkbook = 1;
xlNormalView = 1;
xlPageBreakPreview = 2;
xlCommand = 2;
xlFunction = 1;
xlNotXLM = 3;
xlXmlExportSuccess = 0;
xlXmlExportValidationFailed = 1;
xlXmlImportElementsTruncated = 1;
xlXmlImportSuccess = 0;
xlXmlImportValidationFailed = 2;
xlXmlLoadImportToList = 2;
xlXmlLoadMapXml = 3;
xlXmlLoadOpenXml = 1;
xlXmlLoadPromptUser = 0;
xlGuess = 0;
xlNo = 2;
xlYes = 1;