XLSX-Workbook-Class
XLSX-Workbook-Class copied to clipboard
Cell values are not saved
Good evening. I'm testing the latest release (R33 beta 10). I open the template - see attached file (template.xlsx), fill the cell values ans use saveworkbookas method to save the file. But during the saving some cell values are lost - they are basically empty in the new file. I checked the internal cursors before saving - the string values seems to be there. But I became a bit lost while tracking where exactly these cell values are being written to the new file . The new fie is also attached (empty.xlsx) - I highlighted the empty cell values with yellow. empty.xlsx template.xlsx
I'll check the R33 beta 9 to see if the problem is there
Tried R33 beta 9 and R32 with the same results. Some cell values are still not saved in the result xlsx file. Tried resaving the template in LibreOffice or Microsoft Excel 365 with strict xlsx format with no luck. Th best results so far (less strings lost when I just save it in xlsx book in Excel 365).
Sergey--
I am looking into the problem/bug. Might be a couple of days before the problem is resolved; will keep you posted.
Greg
From: Sergey @.> Sent: Wednesday, January 12, 2022 11:53 AM To: ggreen86/XLSX-Workbook-Class @.> Cc: Subscribed @.***> Subject: [ggreen86/XLSX-Workbook-Class] Cell values are not saved (Issue #65)
Good evening. I'm testing the latest release (R33 beta 10). I open the template - see attached file (template.xlsx), fill the cell values ans use saveworkbookas method to save the file. But during the saving some cell values are lost - they are basically empty in the new file. I checked the internal cursors before saving - the string values seems to be there. But I became a bit lost while tracking where exactly these cell values are being written to the new file . The new fie is also attached (empty.xlsx) - I highlighted the empty cell values with yellow. empty.xlsxhttps://github.com/ggreen86/XLSX-Workbook-Class/files/7856328/empty.xlsx template.xlsxhttps://github.com/ggreen86/XLSX-Workbook-Class/files/7856329/template.xlsx
I'll check the R33 beta 9 to see if the problem is there
— Reply to this email directly, view it on GitHubhttps://github.com/ggreen86/XLSX-Workbook-Class/issues/65, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGWB33PTWZ7L4V3GRSO7SDDUVWWX7ANCNFSM5LZPE3LQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you are subscribed to this thread.Message ID: @.***>
Thank you.
If you need any additional info - please write.
Sergey--
I have found the source of the bug. I am now looking into how to fix it. It is occurring in the writing of the SharedStrings.xml file.
Greg
From: Sergey @.> Sent: Wednesday, January 12, 2022 12:20 PM To: ggreen86/XLSX-Workbook-Class @.> Cc: ggreen86 @.>; Comment @.> Subject: Re: [ggreen86/XLSX-Workbook-Class] Cell values are not saved (Issue #65)
Thank you.
If you need any additional info - please write.
— Reply to this email directly, view it on GitHubhttps://github.com/ggreen86/XLSX-Workbook-Class/issues/65#issuecomment-1011277766, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGWB33IOK3YUGLEBTVVWXS3UVWZ5TANCNFSM5LZPE3LQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you commented.Message ID: @.***>
Turned out to be an easy fix -- attached is the beta version for you to test with. Please email at anduril58 at hotmail dot com if you do not get the attachment.
From: Sergey @.> Sent: Wednesday, January 12, 2022 12:20 PM To: ggreen86/XLSX-Workbook-Class @.> Cc: ggreen86 @.>; Comment @.> Subject: Re: [ggreen86/XLSX-Workbook-Class] Cell values are not saved (Issue #65)
Thank you.
If you need any additional info - please write.
— Reply to this email directly, view it on GitHubhttps://github.com/ggreen86/XLSX-Workbook-Class/issues/65#issuecomment-1011277766, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGWB33IOK3YUGLEBTVVWXS3UVWZ5TANCNFSM5LZPE3LQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you commented.Message ID: @.***>
Thank you. Now everything seems to work fine.
There is still a small issue with the sheet name - that I described in issue #64. The sheet name of the template is in cyrillic so after opening excel with openxlsxworkbook I have to write this line to fix the codepage issue:
REPLACE shname WITH STRCONV(Xl_sheets.shname,11) ALL IN Xl_sheets
After this the sheet name returns to proper one - and then everything works fine.
Thank you again for quick reply!
You are welcome. You will need to re-apply your fix to the class; I will incorporate into this next release when I upload to GitHub.
From: Sergey @.> Sent: Wednesday, January 12, 2022 1:45 PM To: ggreen86/XLSX-Workbook-Class @.> Cc: ggreen86 @.>; Comment @.> Subject: Re: [ggreen86/XLSX-Workbook-Class] Cell values are not saved (Issue #65)
Thank you. Now everything seems to work fine. There is still a small issue with the sheet name - that I described in issue #64https://github.com/ggreen86/XLSX-Workbook-Class/issues/64. The sheet name of the template is in cyrillic so after opening excel with openxlsxworkbook I have to write this line to fix the codepage issue: REPLACE shname WITH STRCONV(Xl_sheets.shname,11) ALL IN Xl_sheets
After this the sheet name returns to proper one - and then everything works fine.
Thank you again for quick reply!
— Reply to this email directly, view it on GitHubhttps://github.com/ggreen86/XLSX-Workbook-Class/issues/65#issuecomment-1011346523, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGWB33LWIFSANUIWFFMVOBTUVXD3XANCNFSM5LZPE3LQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you commented.Message ID: @.***>
You will need to re-apply your fix to the class
Already did this. Thank you again
Sergey--
I am working on the issue you have with sheet name; can you please try the attached class to see if it is fixed and let me know? I am trying to change the codepage of the xl_sheet cursor. Please be sure that you have the class property CodePage set to 1251.
Thank you.
Greg
From: Sergey @.> Sent: Wednesday, January 12, 2022 1:45 PM To: ggreen86/XLSX-Workbook-Class @.> Cc: ggreen86 @.>; Comment @.> Subject: Re: [ggreen86/XLSX-Workbook-Class] Cell values are not saved (Issue #65)
Thank you. Now everything seems to work fine. There is still a small issue with the sheet name - that I described in issue #64https://github.com/ggreen86/XLSX-Workbook-Class/issues/64. The sheet name of the template is in cyrillic so after opening excel with openxlsxworkbook I have to write this line to fix the codepage issue: REPLACE shname WITH STRCONV(Xl_sheets.shname,11) ALL IN Xl_sheets
After this the sheet name returns to proper one - and then everything works fine.
Thank you again for quick reply!
— Reply to this email directly, view it on GitHubhttps://github.com/ggreen86/XLSX-Workbook-Class/issues/65#issuecomment-1011346523, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGWB33LWIFSANUIWFFMVOBTUVXD3XANCNFSM5LZPE3LQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you commented.Message ID: @.***>
loExcel = CREATEOBJECT("vfpxworkbookxlsx")
loExcel.codePage = 1251
loExcel.openxlsxworkbook("v2_1_SMO_RRXXX_ZZZZZZZ_DD_MM_YYYY_N.xlsx")
I tested codepage issue with the class you sent me yesterday - despite setting the codepage (see above) the sheet name in Xl_sheet cursor still seems to be wrong.
it should be "ЧЛ КС" instead of what it is now.
Sorry for the long reply. This issue is probably due to the code page setting for the xl_sheet cursor. I have changed the create cursor command for the xl_sheet to respect the codepage setting. See Release 39, Beta 7.