Hi. I was able to import an XML file no probs. Now I am running into memory limit issues. So want to import the XML as a stream, or import it line by line. How would one acheive this in excel 2007?
I get the name scheme (ns1) headers but no data pulls in. Works ok sometimes, rest of time the machie feels like it gets clogged up and then I get memory errors now won't import anything
Have changes registry to clear the page file on shutdown etc...still problem persists. Then all of a sudden it may function correctly...
How many XLM-lines are you talking about ?
And after import, what do you want to do with it in Excel ?
Code:
Sub alternative()
open "C:\example.XML" for input as #1
sq=split(Input(LOF(1),#1),vbcrLf)
Close
sheets(1).cells(1).resize(ubound(sq)+1)=application.transpose(sq)
End Sub
It is 70mb, quite a few lines. Once imported it is not a problem, can pivot etc
It has been importing fine for 2 weeks, now suddenly lots of problems related to memory.
The file is not corrupt (have tested it on several).
It is the size causing the prob. Before I could import 70mb+ no problem. Now it won't evem import 30mb without an error relating to out of memory, resource or 1004.
Is there any way to allocate all RAM and system resource to Excel on a priority basis?
We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel
Which adblocker are you using?
Disable AdBlock
Follow these easy steps to disable AdBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the icon in the browser’s toolbar. 2)Click on the "Pause on this site" option.
Go back
Disable AdBlock Plus
Follow these easy steps to disable AdBlock Plus
1)Click on the icon in the browser’s toolbar. 2)Click on the toggle to disable it for "mrexcel.com".
Go back
Disable uBlock Origin
Follow these easy steps to disable uBlock Origin
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.
Go back
Disable uBlock
Follow these easy steps to disable uBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.