[Excel Report] Sample OML Example File?

[Excel Report] Sample OML Example File?

  
Forge Component
(3)
Published on 8 Jan by Miguel Meireles
3 votes
Published on 8 Jan by Miguel Meireles
Is there an sample oml that I can download?
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
David Chen wrote:
Is there an sample oml that I can download?
 
 a link to manual https://meiras.outsystemscloud.com/ExcelReportDemo/ExcelReport.docx

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"

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"
 
 
 
Hi joão

send you a demo project

hope it helps
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
 
 
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.
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.
 
 
hi joão

don't try change the encode because not working.
It will be an improvement to make
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")(
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")(