03 Access output to Excel truncates data

%3CLINGO-SUB%20id%3D%22lingo-sub-2175364%22%20slang%3D%22en-US%22%3EAccess%20output%20to%20Excel%20truncates%20data%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2175364%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Community%2C%3CBR%20%2F%3EWe%20have%20an%20Access%20%22Long%20text%22%20data%20type%20field.%3CBR%20%2F%3EIn%20the%20Access%20report%2C%20all%20the%20data%20in%20the%20field%20is%20displayed.%3CBR%20%2F%3EWhen%20the%20data%20is%20exported%20to%20excel%2C%20the%20field%20is%20truncated.%3CBR%20%2F%3EWhat%20is%20weird%20is%20that%20the%20truncation%20in%20excel%20does%20NOT%20start%20at%20255%20characters%2C%20but%20more%20downstream%20so%20to%20speak.%3CBR%20%2F%3EFor%20example%2C%20in%20the%20table%20and%20the%20report%20a%20long%20text%20field%20record%20has%2015%2C460%20characters.%3CBR%20%2F%3EBut%20when%20exported%20to%20excel%20it%20contains%20only%20the%20first%2013%2C212%20characters%20and%20truncates%20the%20remaining%202248%20characters%20of%20the%20long%20text%20field.%3CBR%20%2F%3EPlease%20advise!%26nbsp%3B%3CBR%20%2F%3EThank%20you%20for%20your%20time.%3CBR%20%2F%3EBest%20Regards%2C%3CBR%20%2F%3EDonald%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2175364%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAccess%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2175985%22%20slang%3D%22en-US%22%3ERe%3A%20Access%20output%20to%20Excel%20truncates%20data%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2175985%22%20slang%3D%22en-US%22%3EYou%20do%20not%20say%20what%20version%20of%20Excel%20you%20are%20using.%20Excel%20actually%20has%20quite%20a%20long%20limit%20more%20like%2032%2C000%20to%20the%20definition%20of%20what%20can%20be%20stored%20in%20a%20cell%2C%20however%20what%20actually%20displays%20in%20a%20cell%20can%20be%20less%20that%20that%20for%20older%20versions%20(2003%20and%20older).%20In%20more%20current%20versions%20it%20should%20be%20the%20same.%20Can%20you%20copy%20and%20paste%20the%20value%20manually%20from%20Access%20to%20the%20Excel%20result%20and%20then%20see%20the%20whole%20result%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2176196%22%20slang%3D%22en-US%22%3ERe%3A%20Access%20output%20to%20Excel%20truncates%20data%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2176196%22%20slang%3D%22en-US%22%3EHi%20Maria%2C%3CBR%20%2F%3EThank%20you%20for%20your%20help.%3CBR%20%2F%3ESorry%20-%20you're%20right%20I%20should%20have%20included%20that%20-%20they're%20both%20365...%3CBR%20%2F%3EMS%20Excel%20for%20MS%20365%20MSO%20(16.01....)%2064-bit%3CBR%20%2F%3EMS%20Access%20for%20MS%20365%20MSO%20(16.01...)%2064-bit%3CBR%20%2F%3E%3CBR%20%2F%3EExcel's%2032k%20cell%20limiit%20-%20that's%20the%20other%20oddity%20as%20you%20found%20too%2C%20the%20cell%20has%20plenty%20of%20room%20to%20hold%20the%20data%20coming%20from%20Access.%3CBR%20%2F%3EYes%2C%20we%20can%20copy%20and%20paste%20manually%20form%20Access%20to%20Excel%2C%20no%20problems.%3CBR%20%2F%3EBut%20when%20this%20Access%20form%20button%20exports%20table%20data%20to%20excel%20%2C%20it%20has%20truncation.%3CBR%20%2F%3EPerhaps%20that%20is%20where%20the%20issue%20is%20%3F%20At%20the%20form%2Fmacro.%2Fvb%20layer%3F%3CBR%20%2F%3EBest%20Regards%2C%20Donald%3C%2FLINGO-BODY%3E
Occasional Contributor

Hi Community,
We have an Access "Long text" data type field.
In the Access report, all the data in the field is displayed.
When the data is exported to excel, the field is truncated.
What is weird is that the truncation in excel does NOT start at 255 characters, but more downstream so to speak.
For example, in the table and the report a long text field record has 15,460 characters.
But when exported to excel it contains only the first 13,212 characters and truncates the remaining 2248 characters of the long text field.
Please advise! 
Thank you for your time.
Best Regards,
Donald

16 Replies
You do not say what version of Excel you are using. Excel actually has quite a long limit more like 32,000 to the definition of what can be stored in a cell, however what actually displays in a cell can be less that that for older versions (2003 and older). In more current versions it should be the same. Can you copy and paste the value manually from Access to the Excel result and then see the whole result?
Hi Maria,
Thank you for your help.
Sorry - you're right I should have included that - they're both 365...
MS Excel for MS 365 MSO (16.01....) 64-bit
MS Access for MS 365 MSO (16.01...) 64-bit

Excel's 32k cell limiit - that's the other oddity as you found too, the cell has plenty of room to hold the data coming from Access.
Yes, we can copy and paste manually form Access to Excel, no problems.
But when this Access form button exports table data to excel , it has truncation.
Perhaps that is where the issue is ? At the form/macro./vb layer?
Best Regards, Donald
Thanks Donald. Can you explain exactly how you are exporting to Excel? Are you opening the report in Print Preview mode and then using the Excel export on the Data section of the ribbon?
Hi Maria,
I asked the developer and it seems that is how is exported.
This is her reply;
"
Yes, the button on the report forms opens print preview and then click on excel from there. There’s probably a “prettier” way to do this but since I don’t have that knowledge, I went with what worked.
"
Best Regards,
Donald
I talked to one of the Access Team and this is what he said:
When exporting to older Excel formats (Excel 97-Excel 2003 or older), we export a maximum of 255 characters.
When exporting to current Excel formats, we export more than 13000 characters.
When using the Excel button from Report Print Preview, we only give you the option to export to the older formats (because the code for exporting reports was never updated for the newer Excel formats, only the code for exporting tables)

So, I’m not sure how you get the case where we are exporting >255, but <15000 characters.

If you can give me a database that shows what you are seeing, and information about version/build of Office, I can look further.

If not then you may be able to get around this by exporting directly from the table data instead.

Hi Maria,  
Thank you for you help - there was a bit of back and forth last week internally within the regulatory group regarding sending you a db with the example of the issue ie, " If you can give me a database that shows what you are seeing, and information about version/build of Office, I can look further. ".  
I am not sure how they want to proceed at this time.
I am suggestioning a bare-bones db with just the problem record and output as a test case.
I hope to get back with something mid-week.
Thanks!
Best Regards,

Donald

Hi Maria,
Thank you for your patience.
We have put together a working test case build that demonstrates the truncation issue.
It is attached as "truncation_for_description_field.zip"
Below are screenshots (also in zip file) that step one through the process from opening up the db to exporting the report to excel to show the truncation.
Best Regards, Donald

001.png

002.png

003.png
004.png

005_pre_export_to_excel.png

 

006.png

 

007_exported_to_excel.png

 

 

 

 

 

 

@DonaldCollins Perfect, will pass this on!

Hi Maria, 
Hope all is well. 
Has there been any feedback from the MS team about the test case and issue? 
Thanks!
Best Regards,
Donald

@Maria Barnes 

Hi Maria, 
Hope all is well. 
Has there been any feedback from the MS team about the test case and issue? 
Thanks!
Best Regards,
Donald

Sorry Donald. I was on vacation last week. On 4/5 the team did respond to me. They say "there are some issues here we need to investigate. I can’t give a timeline for addressing them, but I can say that I was able to reproduce the problem, and that we will investigate." That may not be exactly what you are looking for, for the short term, but the fact that they can easily reproduce is a good indicator that it will get fixed.

@Maria Barnes 
Hi Maria - no problem at all, I hope you had a good holiday!
We are glad that they were able to re-produce issue and are investigating it further.
Thank you for following up we are hopeful a fix or workaround is possible.
Best Regards,
Donald

@Maria Barnes


@DonaldCollins 

 

Hi Maria - Hope all is well.  Is there any word/update from the internal team ?

Thanks!

Best Regards,
Donald

Not yet, no. Reading between the lines of their answer I would guess 6 months or so to expect a response.
Okay thank you for the update !

Best Regards,
Donald