Ok, third time is a charm
Hopefully the title explained a little of what I am trying to do but when re-posting it here I screwed up again so forgive me.
I wish I could just delete the other threads. Anyway. (done)
I have a app that uses a product catalog that contains products from several suppliers. These items get updated twice a year by the suppliers and they release those updates in a Excel format. The problem is their format is not compatible with the way I need the data laid out for a record in the catalog.dbf table. They will have multiple rows in the Excel file for the same item. Each row will contain a option for that item and a price. My app needs to look at one record for the item that contains all options and prices. So for now I have be manually in Excel reformatting sometimes 2000 rows into a format I can import.
I am sure I can use the tbl.enter_begin() method to write each record into the new table.
Given that the style number will be the same in the table I create from the suppliers Excel files my thinking is I should be able to read each record that contained the current style number and read the sizes, color group and price for each variation for the style number and write them into variables. Then using the tbl.enter_begin() write the contents of those variables into the new table under one record. Then keep repeating this until all records have been read out of the table created of the supplier Excel files.
My problem is I cannot find a good way to keep reading records in the Excel created table until all options and prices for that style have been read into variables that can be writne into one record of the new table.
I know there is a lot of logic I will need to build into the script but I do not think that will be a problem. Just need to figure out how to keep reading records in one table until I have all the info to write a new record in a new table.
Hopefully the title explained a little of what I am trying to do but when re-posting it here I screwed up again so forgive me.
I wish I could just delete the other threads. Anyway. (done)
I have a app that uses a product catalog that contains products from several suppliers. These items get updated twice a year by the suppliers and they release those updates in a Excel format. The problem is their format is not compatible with the way I need the data laid out for a record in the catalog.dbf table. They will have multiple rows in the Excel file for the same item. Each row will contain a option for that item and a price. My app needs to look at one record for the item that contains all options and prices. So for now I have be manually in Excel reformatting sometimes 2000 rows into a format I can import.
I am sure I can use the tbl.enter_begin() method to write each record into the new table.
Given that the style number will be the same in the table I create from the suppliers Excel files my thinking is I should be able to read each record that contained the current style number and read the sizes, color group and price for each variation for the style number and write them into variables. Then using the tbl.enter_begin() write the contents of those variables into the new table under one record. Then keep repeating this until all records have been read out of the table created of the supplier Excel files.
My problem is I cannot find a good way to keep reading records in the Excel created table until all options and prices for that style have been read into variables that can be writne into one record of the new table.
I know there is a lot of logic I will need to build into the script but I do not think that will be a problem. Just need to figure out how to keep reading records in one table until I have all the info to write a new record in a new table.
Comment