crash in export date TXBrwColumn to excel

crash in export date TXBrwColumn to excel

Postby AntoninoP » Wed May 17, 2017 2:45 pm

Hello,
Exporting to excel a xBrowse column of type Date, the program crashes in this line:
Code: Select all  Expand view
oSheet:Cells( nRow, nCol ):NumberFormat   := Lower( Set( _SET_DATEFORMAT ) )

at begin of the
Code: Select all  Expand view
METHOD ToExcel( oSheet, nRow, nCol ) CLASS TXBrwColumn


It is because I have excel in Italian and the dateFormat is like dd/mm/yyyy.
I put here the same fix I see in another place in the same file:
Code: Select all  Expand view
     if lxlEnglish
        if ValType( ::cEditPicture ) == 'C' .and. Left( ::cEditPicture, 1 ) != '@'
           oSheet:Cells( nRow,nCol ):NumberFormat := Lower( ::cEditPicture )
        else
           oSheet:Cells( nRow,nCol ):NumberFormat := Lower( Set( _SET_DATEFORMAT ) )
        endif
      endif
 

I see that for OOCalc export there is a GetNumberFormatId that convert it for localized formats, maybe we can do it for excel too...
AntoninoP
 
Posts: 375
Joined: Tue Feb 10, 2015 9:48 am
Location: Albenga, Italy

Return to Bugs report & fixes / Informe de errores y arreglos

Who is online

Users browsing this forum: No registered users and 5 guests