Hi,
I want to export over 500 cells to separate .xml files. I wrote a macro in VB which is working (code below) but the exported text inside the exported .xml file is cut. The full text should have ~11500k characters and the exported one is ~8200 characters. I am missing the end part of the text.
Maybe the idea of how to solve this problem is to divide this text into 2 separate cells and combine them during the export? I would appreciate any help with writing a code for this action or any other solution.
Sub SaveAsXML()
Dim cell As Range
Dim FF As Long
Dim Counter As Long
For Each cell In Range("BB2", Range("BB" & Rows.Count).End(xlUp))
If cell.Value <> "" And Range("A" & cell.Row).Value <> "" Then
FF = FreeFile()
Open ThisWorkbook.Path & "\" & Range("C" & cell.Row).Value & ".xml" For Output As #FF
Print #FF, cell.Text
Close #FF
Counter = Counter + 1
End If
Next cell
MsgBox Counter & " files saved. ", , "XML Files Created"
End Sub
Best,
Bohucci
I want to export over 500 cells to separate .xml files. I wrote a macro in VB which is working (code below) but the exported text inside the exported .xml file is cut. The full text should have ~11500k characters and the exported one is ~8200 characters. I am missing the end part of the text.
Maybe the idea of how to solve this problem is to divide this text into 2 separate cells and combine them during the export? I would appreciate any help with writing a code for this action or any other solution.
Sub SaveAsXML()
Dim cell As Range
Dim FF As Long
Dim Counter As Long
For Each cell In Range("BB2", Range("BB" & Rows.Count).End(xlUp))
If cell.Value <> "" And Range("A" & cell.Row).Value <> "" Then
FF = FreeFile()
Open ThisWorkbook.Path & "\" & Range("C" & cell.Row).Value & ".xml" For Output As #FF
Print #FF, cell.Text
Close #FF
Counter = Counter + 1
End If
Next cell
MsgBox Counter & " files saved. ", , "XML Files Created"
End Sub
Best,
Bohucci