Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try the following code:
Sub AAA() Dim FNum As Integer Dim RowNdx As Long Dim FName As String Dim V As Variant Dim WS As Worksheet Dim ColNdx As Long Dim Arr As Variant FNum = FreeFile FName = "H:\Temp2\Test.txt" RowNdx = 1 Set WS = Worksheets(1) Open FName For Input As FNum Do Until EOF(FNum) Line Input #1, V Arr = Split(V, ",") For ColNdx = 0 To UBound(Arr) WS.Cells(RowNdx, ColNdx + 1) = Arr(ColNdx) Next ColNdx ColNdx = 1 RowNdx = RowNdx + 1 If RowNdx = Rows.Count Then RowNdx = 1 With ActiveWorkbook.Worksheets Set WS = .Add(after:=.Item(.Count)) End With End If Loop Close FNum End Sub -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "mpeplow" wrote in message ... I need to import a csv file into excel but the file is way too big to load onto a single speadsheet. How would have excel import the file, then once a sheet is full, create a new sheet and continue the import? ![]() -- mpeplow ------------------------------------------------------------------------ mpeplow's Profile: http://www.excelforum.com/member.php...o&userid=34812 View this thread: http://www.excelforum.com/showthread...hreadid=545694 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
xml import....Size limit?? Can the XML file be split?? | Excel Discussion (Misc queries) | |||
import XML data...Is there a size limit on the import? | Excel Discussion (Misc queries) | |||
How do I remove split a split window? | New Users to Excel | |||
How to Start Excel in Text Import Wizard for data import | Setting up and Configuration of Excel | |||
I can import Access Tables. But, I can't import Access queries | Excel Programming |