Can I stop access truncating >255char fields in export to excel?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a query with a number of fields that are greater than 255 chars.
These fields appear fine in the report.
I want to export this to an excel spreadsheet for reporting out to other
people, but when I do the fields are truncated to 255 chars. This does not
hapen when exporting to rtf, so I assume there is a restriction to a string
length for exporting to excel. Can I avoid this, or is this a crazy bug that
we are expected to live with??
 
Use TransferSpreadsheet macro action, or VBA code's
DoCmd.TransferSpreadsheet method. You can specify there the EXCEL format to
be one of the newer ones (97 - 2000).
 
Thanks - do I have an option for exporting the report into excel - If I can
do this I have an already formatted result: If I export the table, I will
have to split up groupings etc and rebuild the formatting I created for the
report....
 
In the Report Preview mode, check File | Export. I don't think you can
expect the export to be exactly the way you want, but it may be sufficient
for your needs.
--

Ken Snell
<MS ACCESS MVP>
 
My problem is similar but a bit different: I need to send an excel
spreadsheet, created from a query in an e-mail message. The
TransferSpreadsheet method only saves the query to a specified location
(unless I am missing something). Is there a way to either keep Excel from
truncating in an e-mail message, or to save a spreadsheet and then
immediately send that spreadsheet?
 
The TransferSpreadsheet method creates and saves an EXCEL file to a
specified path and filename. There are examples of code in these forums for
sending a file via email using VBA, but I have no experience with doing that
so I cannot offer a specific suggestion, sorry.
--

Ken Snell
http://www.accessmvp.com/KDSnell/
 
Back
Top