1 line
344 KiB
JSON
1 line
344 KiB
JSON
|
|
[{"ts":1781792689201,"type":"say","say":"text","text":"I want you to write a script which takes data from a source file and pastes it into the template and save it as a new file. \n\n# source and template files\nIn the folder is a source file \"Production Order (mrp.production).xlsx\" and a template \"A4004_v3.0-260617.ods\". \nThe source file always varies, therefore I have included three more source files as examples: Production Order (mrp.production)(1).xlsx; Production Order (mrp.production)(2).xlsx; Production Order (mrp.production)(3).xlsx.\nThe script should dynamically find cells in the source file and match them to cells in the template.\n\n# assign cells, rows and columns\nAs all source files differ slightly, cell coordinates have to be handled differently.\nIn the source file, column \"D\" contains the \"Category\" of each individual Part from row 2 onwards.\nIn the source file, column \"E\" contains the \"Name\" of each individual Part.\nIn the source file, column \"G\" contains the \"Part-Serialnumber\" of each individual Part.\nIn the source file, column \"G\" there may be more than one Part-Serialnumber listed for each category.\nIn the template file, column \"B\" contains the \"Category\" of each indivirual Part from row 10 onwards.\nIn the template file, column \"C:D\" contains the \"Name\" of each indivirual Part from row 10 onwards.\nIn the template file, column \"E\" contains the \"Part-Serialnumber\" of each indivirual Part from row 10 onwards.\nIn the source file, \"All / Components / Barebone\" relates to \"Barebone\" in the template.\nIn the source file, \"All / Components / CPU\" relates to \"CPU\" in the template.\nIn the source file, \"All / Components / RAM\" relates to \"Speicher\" in the template.\nIn the source file, \"All / Components / GPU\" relates to \"GPU\" in the template. \nIn the source file, \"All / Components / SSD\" relates to \"NVME U.2\" in the template.\nIn the source file, \"All / Components / Network\" relates to \"NIC\" in the template.\nIn the source file, \"All / Components / RAID\" relates to \"RAID\" in the template.\n\n# set variables\ncreate integer variable \"mGPU\" and set it to 0.\ncreate integer variable \"mRAM\" and set it to 0.\ncreate integer variable \"mSSD\" and set it to 0.\ncreate integer variable \"mGPU\" and set it to 0.\nIn the source file, if the cell below \"All / Components / GPU\" is empty, increase an integer-variable \"mGPU\" by 1 and move down one cell. Then if the next cell below is empty, increase an integer-variable \"mGPU\" by 1 and move down one cell. Repeat this until the cell below is not empty.\nIn the source file, If the cell below \"All / Components / RAM\" is empty, increase an integer-variable \"mRAM\" by 1 and move down one cell. Then if the next cell below is empty, increase an integer-variable \"mGPU\" by 1 and move down one cell. Repeat this until the cell below is not empty.\nIn the source file, If the cell below \"All / Components / SSD\" is empty, increase an integer-variable \"mSSD\" by 1 and move down one cell. Then if the next cell below is empty, increase an integer-variable \"mGPU\" by 1 and move down one cell. Repeat this until the cell below is not empty.\nIn the source file, If the cell below \"All / Components / NIC\" is empty, increase an integer-variable \"mNIC\" by 1 and move down one cell. Then if the next cell below is empty, increase an integer-variable \"mGPU\" by 1 and move down one cell. Repeat this until the cell below is not empty.\n\n# copy Component Name\nIn the source file, look for a cell containing \"All / Components / Barebone\", copy the content in the cell to it's right and paste it into cell \"C10:D10\" in the template.\nIn the source file, look for a cell containing \"All / Components / CPU\", copy the content in the cell to it's right and paste it into cell \"C11:D11\" in the template.\nIn the source file, look for a cell containing \"All / Components / RAM\", copy the content in the cell to it's right and paste it into cell \"C12:D19\" in the template.\nIn the source file, look for a cell contai
|