ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Importing File greater than 65536 (https://www.excelbanter.com/excel-programming/370242-importing-file-greater-than-65536-a.html)

dan

Importing File greater than 65536
 
I need to import a file greater than 65536 lines. I have read and tried
Microsofts macro on this (http://support.microsoft.com/kb/120596/en-us) but I
need the file to be in a Fixed Width format and not the Delimited format the
above macro provided.

How do I switch the import over to Fixed Width?

Thanks

Dave Peterson

Importing File greater than 65536
 
I'd cheat.

I'd use another program to split the text file into smaller pieces--each with
less than 64k lines. Then import each of those sections.



Dan wrote:

I need to import a file greater than 65536 lines. I have read and tried
Microsofts macro on this (http://support.microsoft.com/kb/120596/en-us) but I
need the file to be in a Fixed Width format and not the Delimited format the
above macro provided.

How do I switch the import over to Fixed Width?

Thanks


--

Dave Peterson

dan

Importing File greater than 65536
 
The problem is not the file size but the format. The macro already takes care
of the lenght. The reason for this is I need to proces the data with
additional macros based on the informtion.

The macro from Microsoft is:

Do While Seek(FileNum) <= LOF(FileNum)
'Store One Line Of Text From File To Variable
Line Input #FileNum, ResultStr <----- EDIT HERE?
'Store Variable Data Into Active Cell
If Left(ResultStr, 1) = "=" Then
ActiveCell.Value = "'" & ResultStr
Else
ActiveCell.Value = ResultStr <---- EDIT HERE?
End If

Is there a way to modify the macro at either the above two places to change
the data into a Fixed Width format?

Thanks

"Dave Peterson" wrote:

I'd cheat.

I'd use another program to split the text file into smaller pieces--each with
less than 64k lines. Then import each of those sections.



Dan wrote:

I need to import a file greater than 65536 lines. I have read and tried
Microsofts macro on this (http://support.microsoft.com/kb/120596/en-us) but I
need the file to be in a Fixed Width format and not the Delimited format the
above macro provided.

How do I switch the import over to Fixed Width?

Thanks


--

Dave Peterson



All times are GMT +1. The time now is 03:37 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com