Open GoogleCodeExporter opened 8 years ago
Hi Xarumanx,
There is a hard-coded limit of 1023 set within the Excel connector code as
Excel 2003 is limited to 1024 characters in a cell(refer to:
http://office.microsoft.com/en-au/excel-help/excel-specifications-and-limits-HP0
05199291.aspx)
Excel 2007
(http://office.microsoft.com/en-au/excel-help/excel-specifications-and-limits-HP
010073849.aspx) and Excel 2010
(http://office.microsoft.com/en-au/excel-help/excel-specifications-and-limits-HP
010342495.aspx?CTT=1) do not have this limitation, but the code does not take
this into account.
To allow additional string data to be recorded in higher versions, you can do a
find/replace for 1023 to replace with 32766. In my case I added a constant as
it made sense to document this limitation a little better.
The places to edit are:
Modules
s_force
(General)-(Declarations)
' Excel 2003 Cell String/Function Length Limit
'Public Const maxCellText = 1023
' Excel 2007/2010 Cell String/Function Length Limit
Public Const maxCellText = 32766
Function query_row(sels As String, todo As Range)
g_table.Cells(rw.row + 1 - g_table.row, j).Value = Left(so.Item(name).Value, maxCellText)
Function label_value(so As SObject4, lab As String)
label_value = Left(so.Item(name).Value, maxCellText) ' avoid mem crash
utils
Sub format_write_row(g_body As Range, g_header As Range, g_sfd As SObject4, so As SObject4, row As Integer)
.Cells(row, j).Value = Left(so.Item(name).Value, maxCellText)
I have not tested this change extensively, so it's worth double checking on
your system that it works.
Original comment by arm...@intechnology.com.au
on 17 Jan 2013 at 4:58
Original issue reported on code.google.com by
xarum...@gmail.com
on 2 Mar 2011 at 1:56