I have multiple Excel files for a particular part number which I have narrowed down to few 100s by my search macro, but in those found files my search also needs to look for a particular <code>id tag</code>. Let me explain it, each Excel file having name as part number has information about measurement features of that part . These measured features are represented as different <code>id tags</code>, these tags represent different dimensions of a product, for example, in an Excel file there might be <code>D0,D1,D2,D3</code> to <code>D100</code> ID tag and it's not compulsory that every Excel file should have all the tags, in some files there won't be <code>D0</code> or <code>D1</code>, for example and the position of the tag, i.e. <code>D0</code>, will not always be in the same exact row. So how do I write code which performs two functions: First, to analyse the file if the <code>id tag</code> is present in it or not. Second, if present, locate the <code>id tag</code> and read the measured value column next to it and render result. I have researched, but found that you could read an Excel file only if the data is in a fixed column in each file. No one discussed locating data within excel and finding the right thing that you are looking for and then reading the file. I want to look into the files narrowed by my search code for the ID tag and if the ID tag is present then read the data in a column next to it called as measured value and write it in a table. The data will remain in the same column but the row might not be the same for example If a sheet has tag D0 at location (B,10) it is not necessary that rest all excels would have D0 at (B,10). instead they might be at (B,80) or it might even not be there in the sheet. but if D0 is present there the only fixed thing is (B, This part can change). so the column will always be B which needs to be read but the Row might change . so before picking up the data we need to be sure that the data belongs to Id tag D0 or other wise it might pick up some other tags data and render it as result Kindly help. |
<tbody>
</tbody>
Last edited: