Creating new lines/cells in Excel with iLogic?

Creating new lines/cells in Excel with iLogic?

Anonymous
Not applicable
534 Views
3 Replies
Message 1 of 4

Creating new lines/cells in Excel with iLogic?

Anonymous
Not applicable

I am trying to create a catalog for the various things my company makes with sizes, material, and price liste din neat columns using iLogic and an excel file. trouble is, I can't figure out how to write code to write to new cells (thus creating/extending a list). anyone managed to accomplish something like this?

 

0 Likes
Accepted solutions (1)
535 Views
3 Replies
Replies (3)
Message 2 of 4

HermJan.Otterman
Advisor
Advisor

Hello,

 

what code did you try?

 

In the iLogic snippets under the "excel data links" you can find CellValue...

 

GoExcel.CellValue("filename.xls", "Sheet1", "A2") =  123

 so enter the right filename with the full path!!

sheet name

cel name

and the value you want to punt in the cell

If this answers your question then please select "Accept as Solution"
Kudo's are also appreciated Smiley Wink

Succes on your project, and have a nice day

Herm Jan


0 Likes
Message 3 of 4

Anonymous
Not applicable

Yes, I have used that code function many times. However this isn't what I'm looking for. With the normal cell value snippet whenever I update the associated parameter it will jsut change whatever is in that single cell, but I want what was previously in that cell to remain the same and for the new data to be written to a new cell, so that I can create a list of the different possible sizing at which my company can manufacture a particular part or assembly, along with information such as price for the customer to see. (e.g. 10" shelf costs $20, 12" shelf costs $22 etc.) something like this:

 

Shelf Length        PRICE

10"                          $20

12"                          $22

14"                          $24

 let's say where it says '$20' next to '10"' is cell B1, if I write that normal CellValue string then it will just change B1 to $22 when I input 12" as the new value, rather than juping down and putting $22 in cell B2 and leaving B1 the same (which is what I need to do) 

0 Likes
Message 4 of 4

Anonymous
Not applicable
Accepted solution

Alright, so with a little help from my boss I was able to figure out a solution. I wrote a huge Select Case statement that tells it which cell to write the data to based on th data itself (e.g. Case 12, Write to cell B1, case 24, write to cell B2, etc.)

0 Likes