Home > Back-end >  Delphi xe7 operation. XLS and. XLSX issue
Delphi xe7 operation. XLS and. XLSX issue

Time:09-15

My computer is installed the DELPHI XE7, OFFICE is 2013

A pile of existing EXCEL file, there is. XLS, yes. XLSX, a may be only one sheet in EXCEL table, there may be N sheet, each sheet is about 1 ~ 6 w data,
Now requires all these in the EXCEL file is not read out the content of the sheet blank, write another EXCEL file (of course, these will read sheet of the header is the same)
Actually, namely to combine multiple EXCEL content into an EXCEL (of course, if the number more than 1048575, will continue to generate a second EXCEL)

Originally wanted to use XLSReadWriteII5, but found that it can't calculate sheetcount function,

Want to ask besides written in OLE, are there any other better way? Small woman thanked each master first here,

CodePudding user response:

Suggest that you create a table, EXCEL data read in all things, scenes from table might generate EXCEL,
This is more convenient, can eliminate duplicate data in table,

CodePudding user response:

reference 1st floor lyhoo163 response:
suggest you create a table, EXCEL data read in all things, scenes from table might generate EXCEL,
This is more convenient, can eliminate duplicate data in tables,


Establish a table?

CodePudding user response:

No one can answer?

CodePudding user response:

Top up, let more people see

CodePudding user response:

You said SheetCount refers to a page how many Sheet in Excel?
Can use the Count to statistical!
XLSReadWriteII51. Filename:='D: \ TEMP \ test. XLSX';
XLSReadWriteII51. Read;
Application. MessageBox (PChar (' current EXCEL with '+ inttostr (XLSReadWriteII51. Count) +' Sheet '), 'prompt', MB_OK + MB_ICONINFORMATION);

CodePudding user response:

reference 5 floor kenlewis reply:
you said SheetCount refers to a page how many Sheet in Excel?
Can use the Count to statistical!
XLSReadWriteII51. Filename:='D: \ TEMP \ test. XLSX';
XLSReadWriteII51. Read;
Application. MessageBox (PChar (' current EXCEL with '+ inttostr (XLSReadWriteII51. Count) +' Sheet '), 'prompt', MB_OK + MB_ICONINFORMATION);


Thank you very much, the original SheetCount calculate so, learning
  • Related