I have a file we get from a customer with sales_calculations. That has two sheets which are meant to be appended.
Unfortunately, from one month to the next, the nr. of header_lines in that file can vary - in one month, it's 2, the next it's 3.
So I have to adapt my script from one time to the next.
I'd like to flexibilize that - but to do that, I'd have to understand it first.
I know the parameter I have to flexibilize for the header - that would be easily possible using a variable.
<=> On one of those two sheets, the first numeric value that I need is in line 3, on the other it is in line 4 ;-)
I load the one from the sheet where it is in line 4 - but mysteriously, the LOAD works fine with a parameter of 2 (verified by an ISNUM() function right afterwards that checks whether I have the right value - right above it is a text. There is nothing else in the LOAD to remove lines.
How can that be?
Thanks a lot!
I would probably make a "test"-load over one column and check which row contained the first or a certain value and use this for the header-variable. Another possibilty which I use for (excel) files with quite unknown data-structure is to read the data-structure before the real load begins: Re: Mehrere Excel-Tabellen laden.