LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 100
Default Accurately reading the contents of another spreadsheet

I have a spreadsheet that has VBA that opens, reads, and closes a list
of other spreadsheets and tabs, writing the contents of those
spreadsheets out as CSV files.

The problem that I am encountering is where one of the sheets has a
column that is not wide enough for all the data, so 1234.5678 is read
as 1234.568. I have been getting around this by doing a
Sheet.Columns.AutoFit call when opening each sheet.

This is now breaking on one particular sheet. When I open it, it shows
1234.5678, but when I manually auto-fit the column, it shrinks a
little bit and changes to 1234.568, and this is the same as is
happening in my VBA code.

Any suggestions as to what I can do in my VBA to read the sheet
accurately? I don't want to use the Value2 property, as this breaks
date cells. The only thing I can think of is to do the AutoFit and
then loop through all the columns increasing the widths.

Phil Hibbs.
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Reading contents Fiona Excel Discussion (Misc queries) 3 June 28th 07 02:56 AM
Reading File and adding contents to spreadsheet KermanPM Excel Programming 1 June 13th 07 12:59 AM
Reading Contents of a Directory Nigel Excel Programming 2 December 5th 05 05:57 PM
reading contents of a file Christopher Brooks[_3_] Excel Programming 2 June 14th 04 09:06 PM
Browsing to URL and reading contents Mike[_49_] Excel Programming 9 November 20th 03 07:53 PM


All times are GMT +1. The time now is 10:20 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"