Decimal places using TransferSpreadsheet

G

Guest

I use some code to create a query object via code (with another query as the
source). I then use TransferSpreadsheet to export this object as a .xls file.

This works fine, excpet for the decimals in my average field. I have used
the Fixed format in the underlying queries (set to 2 decimals), but this
format does not get transfered to the .xls file. The fixed format does reduce
the decimals down to 2 places when I open the query, but I notice when I
click in the average field, it shows several decimal places.

Is there a way to cut these values down to 2 places or some way to get the
Fixed format to output?

Thanks in advance,
Clint Herman
 
K

Ken Snell \(MVP\)

You need to format the data in the query that you export. Use a calculated
field instead of the real field, and use the Format function in that
calculated field to modify the format of the actual field's data to your
desired format.
 
G

Guest

Perfect! Thank you.

Ken Snell (MVP) said:
You need to format the data in the query that you export. Use a calculated
field instead of the real field, and use the Format function in that
calculated field to modify the format of the actual field's data to your
desired format.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top