Hi,
I need to import daily to excel a text file starting from a set row (say row:10). This row always looks more or less like this:
---- ---------- ------------- ---------------- ---------- ----
The number of dashes in each group and number of groups can vary from day to day. Groups are separated with a space. These groups of dashes determine where the columns end, however some fileds in the table below row 10 are empty (very often the first column). When I use import text function in excel the spaces are automatically removed which causes problems, because when first column is empty then data from second column goes to the first and everything gets mixed up. I'm stuck trying to figure out VBA code that would count number of dashes in each group (width of column) and number of groups (number of columns) and then applying it to import text properties. Also the spaces should not be deleted when importing the file.
Can anyone help? Thanks in advance!
I need to import daily to excel a text file starting from a set row (say row:10). This row always looks more or less like this:
---- ---------- ------------- ---------------- ---------- ----
The number of dashes in each group and number of groups can vary from day to day. Groups are separated with a space. These groups of dashes determine where the columns end, however some fileds in the table below row 10 are empty (very often the first column). When I use import text function in excel the spaces are automatically removed which causes problems, because when first column is empty then data from second column goes to the first and everything gets mixed up. I'm stuck trying to figure out VBA code that would count number of dashes in each group (width of column) and number of groups (number of columns) and then applying it to import text properties. Also the spaces should not be deleted when importing the file.
Can anyone help? Thanks in advance!