Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Truncating data when Exporting to Excel

Although most exports to excel are numerical in nature, I have an end user that is tapping into a text based field that may have up to 900 characters. Currently when exporting to Excel 2003 SP3 the data is getting truncated at 255 characters.

Is there anything I can do to get the full text of the field and is this behavior consistent with newer versions of Excel?

3 Replies
Not applicable
Author

Hi,

the only possilbility I know is to write a custom export with a macro like the following and like demonstrated in the attached file.

This would not truncate long strings (in comparison to the bultin-function of QlikView for exporting to Excel); but I have to note, that I am using Excel 2007, so just do some tests with the attached file.

Best regards

Stefan



sub exportToExcel
set XLApp = CreateObject("Excel.Application")
XLApp.Visible = True

set XLDoc = XLApp.Workbooks.Add
set table = ActiveDocument.GetSheetObject("LB01")

'Copy table and paste into Excel
set XLSheet = XLDoc.Worksheets(1) 'get the reference to the first sheet
table.CopyTableToClipboard true
XLSheet.Paste XLSheet.Range("A1") 'column where to paste the content

end sub


Not applicable
Author

I've verified this answer and it works great! Thanks Stefan.

Not applicable
Author

I was dealing with the same issue but really didnt want to use a macro, an alternative solution is to export your table to HTML and then import in Excel using External data import.