119
Views
11
Comments
[Excel Report] Sample OML Example File?
Question
excelrp-jpg
Web icon
Forge asset by Miguel Meireles
Is there an sample oml that I can download?
2023-08-23 14-14-33
João Sousa
 
MVP
Hi,

I'm getting the 'Name cannot begin with the ' ' character, hexadecimal value 0x20. Line 1, position 3.' message. I'm using this xmlList:

"<? xml version = ""1.0"" encoding = ""utf-8"">
<DBExport>
<Entity>
<Attribute>
<Name>Area</Name>
<Value>Area</Value>
</Attribute>    
<Attribute>
<Name>Projeto</Name>
<Value>Projeto</Value>
</Attribute>    
<Attribute>
<Name>Origem</Name>
<Value>Origem</Value>
</Attribute>    
<Attribute>
<Name>Dependencia</Name>
<Value>Dependência</Value>
</Attribute>    
<Attribute>
<Name>Responsavel</Name>
<Value>Responsável</Value>
</Attribute>    
<Attribute>
<Name>Descricao</Name>
<Value>Descrição</Value>
</Attribute>    
</Entity>
</DBEXPORT>"
Can you help?

Thanks
JS
2018-12-31 13-37-36
Miguel Meireles
João Sousa wrote:
Hi,

I'm getting the 'Name cannot begin with the ' ' character, hexadecimal value 0x20. Line 1, position 3.' message. I'm using this xmlList:

"<? xml version = ""1.0"" encoding = ""utf-8"">
<DBExport>
<Entity>
<Attribute>
<Name>Area</Name>
<Value>Area</Value>
</Attribute>    
<Attribute>
<Name>Projeto</Name>
<Value>Projeto</Value>
</Attribute>    
<Attribute>
<Name>Origem</Name>
<Value>Origem</Value>
</Attribute>    
<Attribute>
<Name>Dependencia</Name>
<Value>Dependência</Value>
</Attribute>    
<Attribute>
<Name>Responsavel</Name>
<Value>Responsável</Value>
</Attribute>    
<Attribute>
<Name>Descricao</Name>
<Value>Descrição</Value>
</Attribute>    
</Entity>
</DBEXPORT>"
Can you help?

Thanks
JS
 
 Hi João,

in the first line you have a space after the question mark  "<? xml ...." .
try use the the action "Serialization_RecordListToXml" from the extension "XML"

2023-08-23 14-14-33
João Sousa
 
MVP
Hi Miguel, it worked! Nevertheless i am having encoding problems. 
I've already tried to change the encoding on the XML after Serialization_RecordListToXml and also the Mime-Type before downloading the file.
Can you help?

Thanks
João Sousa

Miguel Meireles wrote:
João Sousa wrote:
Hi,

I'm getting the 'Name cannot begin with the ' ' character, hexadecimal value 0x20. Line 1, position 3.' message. I'm using this xmlList:

"<? xml version = ""1.0"" encoding = ""utf-8"">
<DBExport>
<Entity>
<Attribute>
<Name>Area</Name>
<Value>Area</Value>
</Attribute>    
<Attribute>
<Name>Projeto</Name>
<Value>Projeto</Value>
</Attribute>    
<Attribute>
<Name>Origem</Name>
<Value>Origem</Value>
</Attribute>    
<Attribute>
<Name>Dependencia</Name>
<Value>Dependência</Value>
</Attribute>    
<Attribute>
<Name>Responsavel</Name>
<Value>Responsável</Value>
</Attribute>    
<Attribute>
<Name>Descricao</Name>
<Value>Descrição</Value>
</Attribute>    
</Entity>
</DBEXPORT>"
Can you help?

Thanks
JS
 
 Hi João,

in the first line you have a space after the question mark  "<? xml ...." .
try use the the action "Serialization_RecordListToXml" from the extension "XML"
 
 
 
2018-12-31 13-37-36
Miguel Meireles
David Chen wrote:
Is there an sample oml that I can download?
 
 a link to manual https://meiras.outsystemscloud.com/ExcelReportDemo/ExcelReport.docx

2018-12-31 13-37-36
Miguel Meireles
Hi joão

send you a demo project

hope it helps
ExcelReportDemo.oml
2023-08-23 14-14-33
João Sousa
 
MVP
Miguel, 

Thanks for the demo.
It has the same problem though. You can check it by replacing, for instance, the Flight Number 'XG1085' with 'ÃXG1085'.

Thanks,
João
Miguel Meireles wrote:
Hi joão

send you a demo project

hope it helps
 
 
2018-12-31 13-37-36
Miguel Meireles
Hi João

I tested what you say but got no error the only thing that appears in Excel is a different character in that position.
2023-08-23 14-14-33
João Sousa
 
MVP
Hi Miguel, 

That's the problem i have. I have Portugues characters to export to excel.

I've already tried to change the encoding on the XML file that is passed on to the function CreateExcelReport, from utf-8 to utf-16 and nothing. I've also changed the result file content type with the same result.

Thanks
João
I
Miguel Meireles wrote:
Hi João

I tested what you say but got no error the only thing that appears in Excel is a different character in that position.
 
 
2018-12-31 13-37-36
Miguel Meireles
hi joão

don't try change the encode because not working.
It will be an improvement to make
2018-12-31 13-37-36
Miguel Meireles
Hi João,

solution to your problema, when you have to convert xml to binary use encode utf-8

example: TextToBinaryData(Serialization_RecordListToXml2.Xml,"utf-8")(
2023-08-23 14-14-33
João Sousa
 
MVP
Thanks Miguel. That works fine!

Miguel Meireles wrote:
Hi João,

solution to your problema, when you have to convert xml to binary use encode utf-8

example: TextToBinaryData(Serialization_RecordListToXml2.Xml,"utf-8")(
 
 
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.