Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel to SQl 7
Hello,
I am taking information from an Excel spreadsheet and importing it into a tab delimited text file and process the information using a VB 6.0 application that then spits out several different text files. The issue that I am having is that when I import from Excel to the text file it also includes blank cell to the right and bottom of the information that I need. How do I stop this from happening? The excel sheet will always vary on its size. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel to SQl 7
Select entirecolumns to the right of your data and delete them (use the gray
buttons with the column names) Select entirewors below you data and delete them (use the gray buttons with the row numbers) Then save the workbook This should reset the usedrange Go to Tools=Goto = Special and select Last Cell. It should now go to the bottom right corner of your data. -- Regards, Tom Ogilvy "Jim" wrote in message ... Hello, I am taking information from an Excel spreadsheet and importing it into a tab delimited text file and process the information using a VB 6.0 application that then spits out several different text files. The issue that I am having is that when I import from Excel to the text file it also includes blank cell to the right and bottom of the information that I need. How do I stop this from happening? The excel sheet will always vary on its size. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel to SQl 7
If you have spaces in these extraneous cells, then you will need to remove
them first. If you know the range, then don't use currentregion as below, specify the range set rng = Activesheet.Range("A1:Z200") Dim rng As Range set rng = Activesheet.Range("A1").CurrentRegion Workbooks.Add Template:=xlWBATWorksheet rng.copy Activesheet.Range("A1") Activeworkbook.SaveAs Filename:="C:\CSVFiles\Myfile.csv", FileFormat:=xlCSV Activeworkbook.Close Savechanges:=False -- Regards, Tom Ogilvy "JIm" wrote in message ... I understand how to do that but I need this to happen by itself without outside help. Is there code that can help me determine to only take the rows with data in them in the conversion to the text file? -----Original Message----- Select entirecolumns to the right of your data and delete them (use the gray buttons with the column names) Select entirewors below you data and delete them (use the gray buttons with the row numbers) Then save the workbook This should reset the usedrange Go to Tools=Goto = Special and select Last Cell. It should now go to the bottom right corner of your data. -- Regards, Tom Ogilvy "Jim" wrote in message ... Hello, I am taking information from an Excel spreadsheet and importing it into a tab delimited text file and process the information using a VB 6.0 application that then spits out several different text files. The issue that I am having is that when I import from Excel to the text file it also includes blank cell to the right and bottom of the information that I need. How do I stop this from happening? The excel sheet will always vary on its size. . |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel to SQl 7
*** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel to SQl 7
*** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|