Importing

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

Guest

When I export a file into Excel using Microsoft Office XP, rows are placed
between the data exactly the way they should be. Using Excel in the Office
2003 version, the rows are eliminated. This causes an issue when using a
macro because the data shifts. Is there a way to make this uniform? At this
point, I don't care which way it imports as long as it is uniform no matter
which version is used.
 
How are you exporting this into excel? Or are you importing into Excel?
There may be a setting if we know what method you are using and what
resulting table you are getting (Flat, pivot, etc)

You can adapt the code in the macro to work with the amount of data you
have, it's just this won't be possible from the code from the macro
recorder.

The code below for example will find the last cell in column A and this then
can be used to size the true 'UsedRange'

Sub FindLastCell()
Dim lLastRow As Long
Dim iLastCol As Integer
Dim myRng As Range
lLastRow = Range("A65536").End(xlUp).Row
iLastCol = Range("IV1").End(xlToLeft).Column
Set myRng = Range(Cells(1, 1), Cells(lLastRow, iLastCol))
MsgBox "Data covers: " & myRng.Address, vbOKOnly
End Sub



--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
(e-mail address removed)
 
Back
Top