Horadin
06-09-2010, 09:36 AM
Hello! I have a somewhat unique problem, I think, as I've been unable to find anything online that addresses my particular situation.
I'm creating a very large VBA project that will need to be able to read in files, no matter the type (xls, csv, txt, etc) or location (HDD, Network, Mainframe, etc). I've already configured the project to read xls and csv files successfully. My issue is reading in text files.
When a text file is read in, I need to be able to split the file into multiple columns. I know that there's a TextToColumns method and wizard that's available. The problem is that they may import the file multiple times, and I don't want the user to have to specify the delimiter or column separations every time. I would like to save off that information and store it so that later when they re-import their file, the Excel app can do it automatically without requesting this information again.
Is there any good way to do this? I'm not opposed to anything - whether that's using the wizard and grabbing the information, building my own input form somehow, or any other ideas that can be suggested. I'm just at a loss for how to approach this one. The only method I've been able to come up with in my head is to have the wizard process their file, and then examine the results of the wizard with how the file originally looked, and somehow determine what their selections were, based on those differences. This just seems really difficult and messy... Seems like there should be a better way.
Help! : pray2:
I'm creating a very large VBA project that will need to be able to read in files, no matter the type (xls, csv, txt, etc) or location (HDD, Network, Mainframe, etc). I've already configured the project to read xls and csv files successfully. My issue is reading in text files.
When a text file is read in, I need to be able to split the file into multiple columns. I know that there's a TextToColumns method and wizard that's available. The problem is that they may import the file multiple times, and I don't want the user to have to specify the delimiter or column separations every time. I would like to save off that information and store it so that later when they re-import their file, the Excel app can do it automatically without requesting this information again.
Is there any good way to do this? I'm not opposed to anything - whether that's using the wizard and grabbing the information, building my own input form somehow, or any other ideas that can be suggested. I'm just at a loss for how to approach this one. The only method I've been able to come up with in my head is to have the wizard process their file, and then examine the results of the wizard with how the file originally looked, and somehow determine what their selections were, based on those differences. This just seems really difficult and messy... Seems like there should be a better way.
Help! : pray2: