https://bz.apache.org/ooo/show_bug.cgi?id=126837
--- Comment #6 from [email protected] --- (In reply to taniagar from comment #2) > (In reply to damjan from comment #1) > > Please explain how you are exporting them. Copy and paste? Save to a file > > (which format)? Some API? Which code are you using? > > Hi, I'm saving data to a file using Lotus Notes application code. This is > the code Im using: > > For i=0 To loops-1 > ''Exporting Notes-Data Code To OpenOffice Calc Applicaiton > Set cell1 = worksheet.getCellByPosition(0,i) > Set cell2 = worksheet.getCellByPosition(1,i) > Set cell3 = worksheet.getCellByPosition(2,i) > > cell1.setString(Cstr(doc.EDForwardID(0))) > cell2.setString(Cstr(doc.EDEmpMailID(0))) > cell3.setString(Cstr(doc.EDEmpPh(0))) Spreadsheets represent dates as numbers (the number of days since 00:00:00 on 2 January 1899), not as text, with formatting applied to show the number as a date/time. Instead of those setString calls, try this: ' Set the date format: LocalSettings.Language = "en" LocalSettings.Country = "us" NumberFormats = Doc.NumberFormats NumberFormatString = "YYYY/MM/DD HH:MM:SS" NumberFormatId = NumberFormats.queryKey(NumberFormatString, LocalSettings, True) If NumberFormatId = -1 Then NumberFormatId = NumberFormats.addNew(NumberFormatString, LocalSettings) End If ' Populate the cells: cell1.Value = doc.EDForwardID(0) cell1.NumberFormat = NumberFormatId -- You are receiving this mail because: You are the assignee for the issue.
