need simple import macro for xls file

alvbnp

Board Regular
Joined
Jun 26, 2006
Messages
180
I am trying to import from xls file using 'Import External Data' in Excel, but some data is missing. No matter what settings I tried, there will be missing data. Thus, I am seeking help for a macro to do the import. I suppose it should be a simple coding. Thanks.
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.

alvbnp

Board Regular
Joined
Jun 26, 2006
Messages
180

ADVERTISEMENT

My current step is just using the 'Import External Data' - 'Import Data' and select the xls file. But the problem is some data is missing after the import.

I just want to import everything exactly the same. And I don't want to use copy and paste.
 

agihcam

Well-known Member
Joined
Jan 16, 2006
Messages
1,624
sorry, my excel doesn't have feature as you mentioned, i could not duplicate what you have.
 

alvbnp

Board Regular
Joined
Jun 26, 2006
Messages
180

ADVERTISEMENT

The function is under 'Data' - 'Import External Data' - 'Import Data'

After some research, I guess most probably the missing data is due to the source file first column is empty.

Just forget about the Excel built-in import function, can anyone provide a macro that can do the import? Import from xls file into xls file.

Thanks.
 

agihcam

Well-known Member
Joined
Jan 16, 2006
Messages
1,624
why dont you try Data Base Query ( MS Query ), this is very powerful and you dont need codes. Please let me know if you are familiar with this function, if not post back if you want to try.
 

alvbnp

Board Regular
Joined
Jun 26, 2006
Messages
180
I am unable to use the Database Query as suggested. The source file although is in Excel format, but it is rather messy. It has lot's of empty rows, lot's of unrelevant text and so on.

My idea is to import the whole thing into my new Excel file, then do the formating (eg: deleting empty rows). And at the end, I need to use the data for comparison.
 

agihcam

Well-known Member
Joined
Jan 16, 2006
Messages
1,624
My idea is to import the whole thing into my new Excel file, then do the formating (eg: deleting empty rows). And at the end, I need to use the data for comparison.

i could not understand your real problem. this thing can be done in a simple save as copy command. or move or copy to new book...
 

Forum statistics

Threads
1,141,016
Messages
5,703,751
Members
421,312
Latest member
Mooncake1

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top