Bug 7234

SaveAs XLSX! issue with datetime fields. 10 September, 2021

Marzena Ozieblo
09 September, 2021
Product: PowerBuilder Category: DataWindow
Version: 2019 R2 Build: 2328
Classification: Issue Publishing: Public
Priority: P3
Status: Closed Reason: RESOLVED
Chris Pollach @Appeon 10 September, 2021
#4
Hi Marzena;

   Thank for the feedback and I am super glad that you found your issue! I would suggest though that you might want to open a ticket with Microsoft Excel support on this issue. Excel should handle any datetime data regardless of the Regional Settings as long as it's in ISO standard format (CCYY-MM-DD HH:MM:SS:TTT)

   I will now close this ticket.

Regards ... Chris
Marzena Ozieblo 10 September, 2021
#3
Hi Chris,
I tested on other computer and it seems to be something wrong with my regional settings! 
I changed it and it works now. Please close the ticket. 

Best Regards,
Marzena
Chris Pollach @Appeon 09 September, 2021
#2
Hi Marzena;

   I was able to use a table in my Oracle DBMS that had the DATE datatype. Oracle considers this a DateTime. From there, I create a DataWindow and used the SaveAs() to create an Excel file (.XLSX). From there, the MS-Office365 Excel software was able to open the PB built XLSX with no errors on the DT information included in the spreadsheet.

   All the DT data displayed correctly in Excel as it did in the PB DWO. Thus, I cannot replicate your issue.

   Please create a simple test case PB App that demonstrates this problem. I would suggest using the ImportFile() command to load some DW test data instead of relying on having an Oracle DB instance to make the test case easier to review.

Many thanks in advance!

Regards ... Chris
Marzena Ozieblo 09 September, 2021
#1
PBSaveAsXLSXIssue.docx (63KB)

*Phenomenon:
Issue when opening SaveAs file in XLSX! format when datetime column is present.

*Reproduce Steps:
dw_1.SaveAs(“c:\temp\dw_1.xlsx”, XLSX!, True)
When opening the file in Excel:
We found problem with some content ... Do you want us to try to recover as much as we can? If you trust the source of this workbook, click Yes.
Please see details in the attachment. 

Remarks:
Excel version: Microsoft Excel for Microsoft 365 MSO (16.0.13127.21734) 64-bit
For dw_1.SaveAs(“c:\temp\dw_1.xls”, Excel8!, True) it works.
OS:
Windows 10
Platform:
32-bit
Database Type:
Oracle
Database Version:
19c