Prema
02-16-2010, 08:00 AM
Hi All,
Can anyone tell me How do I Import only selected fields OR columns(including Field OR Column names) into Excel? i.e If i want to import only a few columns into current excel sheet from another file.
This file can be of any type like coma OR tab delimited CSV file, OR any other delimited file OR file that may not contain any delimiters at all.
I have some templates which will prompt the user to enter a delimiter, then I need for the user to be able to click a button, which would then bring up an open file dialog, and then once the appropriate file is selected, it should prompt the user to enter the 'number of columns' to be imported into current spreadsheet. Once the number of columns to be imported is entered, again it should prompt the user to select the 'columns' to be imported (i.e if user needs only 2 columns data to be imported into current spreadsheet,after selecting the desired file it should prompt for 2, once its OK, it should prompt for first column name to be imported,then the user to be able to click a button which will prompt for second column name to be imported) and once both the columns have been selected, the selected column names and the selected column's data should be imported into desired columns of current spreadsheet i.e if I fix some columns and rows in current spreadsheet for example A10 ,it should populate the first column into A10,and the next column into B10,... of current spreadsheet. If the user enters a column name i.e not existed in the file to be imported, it should popup a message like 'invalid ' , otherwise it should popup a message like 'Successful'.
If the file to be imported not contain any delimiters it should be able to accept that file with the same above procedure.
And if the user enters ' ,' and try to import Tab delimited file (OR other, other than CSV) it should popup error message.
Thanks,
Prema
Can anyone tell me How do I Import only selected fields OR columns(including Field OR Column names) into Excel? i.e If i want to import only a few columns into current excel sheet from another file.
This file can be of any type like coma OR tab delimited CSV file, OR any other delimited file OR file that may not contain any delimiters at all.
I have some templates which will prompt the user to enter a delimiter, then I need for the user to be able to click a button, which would then bring up an open file dialog, and then once the appropriate file is selected, it should prompt the user to enter the 'number of columns' to be imported into current spreadsheet. Once the number of columns to be imported is entered, again it should prompt the user to select the 'columns' to be imported (i.e if user needs only 2 columns data to be imported into current spreadsheet,after selecting the desired file it should prompt for 2, once its OK, it should prompt for first column name to be imported,then the user to be able to click a button which will prompt for second column name to be imported) and once both the columns have been selected, the selected column names and the selected column's data should be imported into desired columns of current spreadsheet i.e if I fix some columns and rows in current spreadsheet for example A10 ,it should populate the first column into A10,and the next column into B10,... of current spreadsheet. If the user enters a column name i.e not existed in the file to be imported, it should popup a message like 'invalid ' , otherwise it should popup a message like 'Successful'.
If the file to be imported not contain any delimiters it should be able to accept that file with the same above procedure.
And if the user enters ' ,' and try to import Tab delimited file (OR other, other than CSV) it should popup error message.
Thanks,
Prema