Hello all
Sorry for any mistakes made in advance. I'm new to this forum
Ok I realy need some help on this?
Basically I have an excel workbook that is able to export the data input into it as an XML file, but now I need to create another macro that allows me to reload this data back into the template workbook.
Currently the xml file follows the format:
Here is an example result text inside the xml:
What I need is a macro to read the value fields, back into their respective cell references (defined by <Cell>Cell_Value</Cell>), on the correct worksheets (Job_Data & Imported_Data). Does anyone have any ideas on how to do this (please note my VBA XML programing skills are minimal). Thank you
Kushla0
Sorry for any mistakes made in advance. I'm new to this forum
Ok I realy need some help on this?
Basically I have an excel workbook that is able to export the data input into it as an XML file, but now I need to create another macro that allows me to reload this data back into the template workbook.
Currently the xml file follows the format:
PHP:
<WorkbookName><WorksheetName1><Range><Cell>Cell_Value</Cell><Value>Value_in_Cell</Value><NumberFormat>Cell_Format</NumberFormat></Range><Range><Cell>Cell_Value2</Cell><Value>Value_in_Cell2</Value><NumberFormat>Cell_Format2</NumberFormat></Range><Range>................</WorksheetName1><WorksheetName2>.................
Here is an example result text inside the xml:
PHP:
<Path_Plot_Application_Data><Job_Data><Range><Cell>C6</Cell><Value>test</Value><NumberFormat>General</NumberFormat></Range><Range><Cell>D6</Cell><Value></Value><NumberFormat>General</NumberFormat></Range><Range><Cell>E6</Cell><Value></Value><NumberFormat>General</NumberFormat></Range><Range><Cell>F6</Cell><Value></Value><NumberFormat>General</NumberFormat></Range><Range><Cell>G6</Cell><Value></Value><NumberFormat>General</NumberFormat></Range><Range><Cell>H6</Cell><Value></Value><NumberFormat>General</NumberFormat></Range><Range><Cell>I6</Cell><Value></Value><NumberFormat>General</NumberFormat></Range><Range><Cell>C7</Cell><Value>1</Value><NumberFormat>@</NumberFormat></Range><Range><Cell>D7</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>E7</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>F7</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>G7</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>H7</Cell><Value></Value><NumberFormat>General</NumberFormat></Range><Range><Cell>I7</Cell><Value></Value><NumberFormat>General</NumberFormat></Range><Range><Cell>C8</Cell><Value>HP</Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>D8</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>E8</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>F8</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>G8</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>H8</Cell><Value></Value><NumberFormat>General</NumberFormat></Range><Range><Cell>I8</Cell><Value></Value><NumberFormat>General</NumberFormat></Range><Range><Cell>C9</Cell><Value>9</Value><NumberFormat>0</NumberFormat></Range><Range><Cell>D9</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>E9</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>F9</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>G9</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>H9</Cell><Value></Value><NumberFormat>General</NumberFormat></Range><Range><Cell>I9</Cell><Value></Value><NumberFormat>General</NumberFormat></Range><Range><Cell>C10</Cell><Value>8</Value><NumberFormat>0</NumberFormat></Range><Range><Cell>D10</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>E10</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>F10</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>G10</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>H10</Cell><Value></Value><NumberFormat>General</NumberFormat></Range><Range><Cell>I10</Cell><Value></Value><NumberFormat>General</NumberFormat></Range><Range><Cell>C11</Cell><Value>3D</Value><NumberFormat>0</NumberFormat></Range><Range><Cell>D11</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>E11</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>F11</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>G11</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>H11</Cell><Value></Value><NumberFormat>General</NumberFormat></Range><Range><Cell>I11</Cell><Value></Value><NumberFormat>General</NumberFormat></Range><Range><Cell>C12</Cell><Value>111112</Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>D12</Cell><Value>to</Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>E12</Cell><Value>2222221</Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>F12</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>G12</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>H12</Cell><Value></Value><NumberFormat>General</NumberFormat></Range><Range><Cell>I12</Cell><Value></Value><NumberFormat>General</NumberFormat></Range><Range><Cell>C13</Cell><Value>MM3001</Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>D13</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>E13</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>F13</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>G13</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>H13</Cell><Value></Value><NumberFormat>General</NumberFormat></Range><Range><Cell>I13</Cell><Value></Value><NumberFormat>General</NumberFormat></Range><Range><Cell>C14</Cell><Value>250</Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>D14</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>E14</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>F14</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>G14</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>H14</Cell><Value></Value><NumberFormat>General</NumberFormat></Range><Range><Cell>I14</Cell><Value></Value><NumberFormat>General</NumberFormat></Range><Range><Cell>C15</Cell><Value>400</Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>D15</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>E15</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>F15</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>G15</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>H15</Cell><Value></Value><NumberFormat>General</NumberFormat></Range><Range><Cell>I15</Cell><Value></Value><NumberFormat>General</NumberFormat></Range><Range><Cell>C16</Cell><Value>ASME-3</Value><NumberFormat>0</NumberFormat></Range><Range><Cell>D16</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>E16</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>F16</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>G16</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>H16</Cell><Value></Value><NumberFormat>General</NumberFormat></Range><Range><Cell>I16</Cell><Value></Value><NumberFormat>General</NumberFormat></Range><Range><Cell>C17</Cell><Value>o.adb</Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>D17</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>E17</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>F17</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>G17</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>H17</Cell><Value></Value><NumberFormat>General</NumberFormat></Range><Range><Cell>I17</Cell><Value></Value><NumberFormat>General</NumberFormat></Range><Range><Cell>C18</Cell><Value>400</Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>D18</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>E18</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>F18</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>G18</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>H18</Cell><Value></Value><NumberFormat>General</NumberFormat></Range><Range><Cell>I18</Cell><Value></Value><NumberFormat>General</NumberFormat></Range><Range><Cell>C19</Cell><Value>600</Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>D19</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>E19</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>F19</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>G19</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>H19</Cell><Value></Value><NumberFormat>General</NumberFormat></Range><Range><Cell>I19</Cell><Value></Value><NumberFormat>General</NumberFormat></Range><Range><Cell>C20</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>D20</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>E20</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>F20</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>G20</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>H20</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>I20</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>C21</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>D21</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>E21</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>F21</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>G21</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>H21</Cell><Value></Value><NumberFormat>General</NumberFormat></Range><Range><Cell>I21</Cell><Value></Value><NumberFormat>General</NumberFormat></Range><Range><Cell>C22</Cell><Value>kupatel</Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>D22</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>E22</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>F22</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>G22</Cell><Value></Value><NumberFormat>0.0</NumberFormat></Range><Range><Cell>H22</Cell><Value></Value><NumberFormat>General</NumberFormat></Range><Range><Cell>I22</Cell><Value></Value><NumberFormat>General</NumberFormat></Range><Alstom_Path_Plot_Application_Data/></Job_Data><Imported_Data><B6><Cell>B6</Cell><Value>0.</Value><NumberFormat>0.000000</NumberFormat></B6><C6><Cell>C6</Cell><Value>84.4518661</Value><NumberFormat>0.000000</NumberFormat></C6><D6><Cell>D6</Cell><Value>-23.2632275</Value><NumberFormat>0.000000</NumberFormat></D6><E6><Cell>E6</Cell><Value>-21.1439476</Value><NumberFormat>0.000000</NumberFormat></E6><F6><Cell>F6</Cell><Value>56.9016457</Value><NumberFormat>0.000000</NumberFormat></F6><G6><Cell>G6</Cell><Value>-48.9291496</Value><NumberFormat>0.000000</NumberFormat></G6><H6><Cell>H6</Cell><Value>65.3388214</Value><NumberFormat>0.000000</NumberFormat></H6><B7><Cell>B7</Cell><Value>15.6022682</Value><NumberFormat>0.000000</NumberFormat></B7><C7><Cell>C7</Cell><Value>63.2934341</Value><NumberFormat>0.000000</NumberFormat></C7><D7><Cell>D7</Cell><Value>-14.2013493</Value><NumberFormat>0.000000</NumberFormat></D7><E7><Cell>E7</Cell><Value>-18.4312534</Value><NumberFormat>0.000000</NumberFormat></E7><F7><Cell>F7</Cell><Value>39.3257332</Value><NumberFormat>0.000000</NumberFormat></F7><G7><Cell>G7</Cell><Value>-30.2294827</Value><NumberFormat>0.000000</NumberFormat></G7><H7><Cell>H7</Cell><Value>40.524456</Value><NumberFormat>0.000000</NumberFormat></H7><B8><Cell>B8</Cell><Value>15.7308493</Value><NumberFormat>0.000000</NumberFormat></B8><C8><Cell>C8</Cell><Value>63.12323</Value><NumberFormat>0.000000</NumberFormat></C8><D8><Cell>D8</Cell><Value>-14.1402388</Value><NumberFormat>0.000000</NumberFormat></D8><E8><Cell>E8</Cell><Value>-18.3934937</Value><NumberFormat>0.000000</NumberFormat></E8><F8><Cell>F8</Cell><Value>39.1429558</Value><NumberFormat>0.000000</NumberFormat></F8><G8><Cell>G8</Cell><Value>-30.0981808</Value><NumberFormat>0.000000</NumberFormat></G8><H8><Cell>H8</Cell><Value>40.3909149</Value><NumberFormat>0.000000</NumberFormat></H8><B9><Cell>B9</Cell><Value>20.4386101</Value><NumberFormat>0.000000</NumberFormat></B9><C9><Cell>C9</Cell><Value>57.0722656</Value><NumberFormat>0.000000</NumberFormat></C9><D9><Cell>D9</Cell><Value>-11.8573666</Value><NumberFormat>0.000000</NumberFormat></D9><E9><Cell>E9</Cell><Value>-17.3107967</Value><NumberFormat>0.000000</NumberFormat></E9><F9><Cell>F9</Cell><Value>32.9991302</Value><NumberFormat>0.000000</NumberFormat></F9><G9><Cell>G9</Cell><Value>-25.8270245</Value><NumberFormat>0.000000</NumberFormat></G9><H9><Cell>H9</Cell><Value>35.4138489</Value><NumberFormat>0.000000</NumberFormat></H9><B10><Cell>B10</Cell><Value>20.4386215</Value><NumberFormat>0.000000</NumberFormat></B10><C10><Cell>C10</Cell><Value>57.0722694</Value><NumberFormat>0.000000</NumberFormat></C10><D10><Cell>D10</Cell><Value>-11.8573666</Value><NumberFormat>0.000000</NumberFormat></D10><E10><Cell>E10</Cell><Value>-17.3107986</Value><NumberFormat>0.000000</NumberFormat></E10><F10><Cell>F10</Cell><Value>32.9991302</Value><NumberFormat>0.000000</NumberFormat></F10><G10><Cell>G10</Cell><Value>-25.8270245</Value><NumberFormat>0.000000</NumberFormat></G10><H10><Cell>H10</Cell><Value>35.4138489</Value><NumberFormat>0.000000</NumberFormat></H10><B11><Cell>B11</Cell><Value>39.1344566</Value><NumberFormat>0.000000</NumberFormat></B11><C11><Cell>C11</Cell><Value>31.5536652</Value><NumberFormat>0.000000</NumberFormat></C11><D11><Cell>D11</Cell><Value>-4.10697651</Value><NumberFormat>0.000000</NumberFormat></D11><E11><Cell>E11</Cell><Value>-13.8963032</Value><NumberFormat>0.000000</NumberFormat></E11><F11><Cell>F11</Cell><Value>9.87375355</Value><NumberFormat>0.000000</NumberFormat></F11><G11><Cell>G11</Cell><Value>-12.3550034</Value><NumberFormat>0.000000</NumberFormat></G11><H11><Cell>H11</Cell><Value>14.2582111</Value><NumberFormat>0.000000</NumberFormat></H11><B12><Cell>B12</Cell><Value>39.1355858</Value><NumberFormat>0.000000</NumberFormat></B12><C12><Cell>C12</Cell><Value>31.5521107</Value><NumberFormat>0.000000</NumberFormat></C12><D12><Cell>D12</Cell><Value>-4.10649014</Value><NumberFormat>0.000000</NumberFormat></D12><E12><Cell>E12</Cell><Value>-13.8960848</Value><NumberFormat>0.000000</NumberFormat></E12><F12><Cell>F12</Cell><Value>9.87233925</Value><NumberFormat>0.000000</NumberFormat></F12><G12><Cell>G12</Cell><Value>-12.3542166</Value><NumberFormat>0.000000</NumberFormat></G12><H12><Cell>H12</Cell><Value>14.2570286</Value><NumberFormat>0.000000</NumberFormat></H12><B13><Cell>B13</Cell><Value>39.1499825</Value><NumberFormat>0.000000</NumberFormat></B13><C13><Cell>C13</Cell><Value>31.531765</Value><NumberFormat>0.000000</NumberFormat></C13><D13><Cell>D13</Cell><Value>-4.09989691</Value><NumberFormat>0.000000</NumberFormat></D13><E13><Cell>E13</Cell><Value>-13.893693</Value><NumberFormat>0.000000</NumberFormat></E13><F13><Cell>F13</Cell><Value>9.85428429</Value><NumberFormat>0.000000</NumberFormat></F13><G13><Cell>G13</Cell><Value>-12.3441486</Value><NumberFormat>0.000000</NumberFormat></G13><H13><Cell>H13</Cell><Value>14.2417202</Value><NumberFormat>0.000000</NumberFormat></H13><B14><Cell>B14</Cell><Value>58.7915993</Value><NumberFormat>0.000000</NumberFormat></B14><C14><Cell>C14</Cell><Value>3.13160348</Value><NumberFormat>0.000000</NumberFormat></C14><D14><Cell>D14</Cell><Value>5.26118755</Value><NumberFormat>0.000000</NumberFormat></D14><E14><Cell>E14</Cell><Value>-8.92178726</Value><NumberFormat>0.000000</NumberFormat></E14><F14><Cell>F14</Cell><Value>-16.2402382</Value><NumberFormat>0.000000</NumberFormat></F14><G14><Cell>G14</Cell><Value>3.18408799</Value><NumberFormat>0.000000</NumberFormat></G14><H14><Cell>H14</Cell><Value>-6.71899748</Value><NumberFormat>0.000000</NumberFormat></H14></Imported_Data></Path_Plot_Application_Data>
What I need is a macro to read the value fields, back into their respective cell references (defined by <Cell>Cell_Value</Cell>), on the correct worksheets (Job_Data & Imported_Data). Does anyone have any ideas on how to do this (please note my VBA XML programing skills are minimal). Thank you
Kushla0