Hello,
I am an archivist using spreadsheets to assemble metadata which I need to export into xml files. I need each row to be its own file which will then be a sidecar file to the digital asset it is related to. I am very new to coding and to posting on this forum so please forgive me if I do this incorrectly.
I have this code for a Macro which I got off of this forum here: https://stackoverflow.com/questions/...rate-xml-files
but I also see this topic discussed here on this forum here: 802130-convert-each-row-in-a-spreadsheet-into-txt-or-xml-file.html
Both have very different solutions.
I used the code from stackoverflow and a colleague modified it to work with my desired column setup and output however, neither of us is so proficient that we can debug an issue I am having with it.
The first time I use it I saved the spreadsheet as macro-enabled and created this macro via developer, it worked great. But if I want to run it again it doesn't work. Usually I get the following error,
"Run-time error '-2147024809 (80070057)': The parameter is incorrect"
When I hit debug it just highlights the line doc.save sFile (I don't know what to do at that point). However, I think that the issue is really the section with lLastRow
I've been trying to find different snippets to use instead such as lastrow = .Cells(.Rows.Count, "F").End(xlUp).Row including adding a DIM line and changing the lRow and the lLastRow etc. but then I end up with different errors and I am just not sure how to do this correctly.
This is something I will need to use regularly in different workbooks/spreadsheets. (I am hoping to get a database created to move away from having lots of spreadsheets. but that is not happening that fast)
I cannot post the code directly in this post because apparently it has some kind of HTML component to it (I have NO idea which part that is...) so the moderator suggested I post my question and issue I am having and then attach the code. The link from stackoverflow shows the gist of the code I am working with. Attached is a txt file of just the code but if you are uncomfortable opening go to the site I mentioned. The code I am trying to use is set up to export into Dublin Core xml.
tnx for any help you can offer.
Bookmarks