Can not open xlsx successfully with MSExcel
Posted: Tue Jan 05, 2016 2:52 am
Hi,
I am creating a project with Delphi 7, MSSql 2000 in which the user is able to draw the content of a database and export it in an xlsx file.
Now, I put in a form an XLSReadWriteII 5 object (which I named XLappSun) and execute the following code in order to create the xlsx file:
Then I create a loop in which I query the possible data of my only one table "CredentialT" and until the end of the loop I put in each cell the appropriate data by executing the code:
Last I save the xlsx I created executing the code:
Now I have to note that the data in "CredentialsT" table belong to ASCII encoding and moreover even though the password column is somehow encrypted using alternation algorithms there is no corrupt data in it.
Now, if I preview the "kiki.xlsx" file with a XLSSpreadSheet component then I can see the data exactly as they are.
However if I open the "kiki.xlsx" with OpenOffice then I see only half of the data and, much worse, if I open it with MSExcel 2013 I can see only the data of integer type.
WHY is this happening and what can I do to in order to be able and inspect the file not only through XLSSpreadSheet but also through openoffice or MSExcel ?
Thank you in advance
P.S.: I would like to attach both the "kiki.xlsx" file as well as my database file (with only CredentialsT table for testing purposes ), but I can't see how to attach these files.
With them the whole problem would be much more easily to understand. Is there any way to attach them ?
I am creating a project with Delphi 7, MSSql 2000 in which the user is able to draw the content of a database and export it in an xlsx file.
Now, I put in a form an XLSReadWriteII 5 object (which I named XLappSun) and execute the following code in order to create the xlsx file:
Code: Select all
XLappSun.Clear;
Code: Select all
XLappSun.Sheets[0].AsString(Column, Row)
Code: Select all
XLappSun.SaveToFile('c:\kpapas\kiki100.xlsx');
Now, if I preview the "kiki.xlsx" file with a XLSSpreadSheet component then I can see the data exactly as they are.
However if I open the "kiki.xlsx" with OpenOffice then I see only half of the data and, much worse, if I open it with MSExcel 2013 I can see only the data of integer type.
WHY is this happening and what can I do to in order to be able and inspect the file not only through XLSSpreadSheet but also through openoffice or MSExcel ?
Thank you in advance
P.S.: I would like to attach both the "kiki.xlsx" file as well as my database file (with only CredentialsT table for testing purposes ), but I can't see how to attach these files.
With them the whole problem would be much more easily to understand. Is there any way to attach them ?