Excel to DITA join cells?

Having trouble installing Oxygen? Got a bug to report? Post it all here.
Gimber78
Posts: 7
Joined: Thu Jun 22, 2023 1:31 pm

Excel to DITA join cells?

Post by Gimber78 »

Hi! is it possible to save the union of cells when converting from xlsx to dita?
2023-06-22_13-34-47.jpg
2023-06-22_13-34-47.jpg (19.3 KiB) Viewed 690 times
2023-06-22_13-36-09.jpg
2023-06-22_13-36-09.jpg (22.1 KiB) Viewed 690 times
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: Excel to DITA join cells?

Post by Radu »

Hi,
I created a small Excel sheet which has a cell spanning multiple rows and columns.
I tried using Oxygen 25.1 to copy the cells from Excel and then paste them in a DITA topic and it seems to work for me.
Screenshot 2023-06-22 at 14.23.09.png
Screenshot 2023-06-22 at 14.23.09.png (185.79 KiB) Viewed 684 times
How do you convert the Excel to DITA on your side? What version of Oxygen are you using?
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Gimber78
Posts: 7
Joined: Thu Jun 22, 2023 1:31 pm

Re: Excel to DITA join cells?

Post by Gimber78 »

Hi Radu!
Oxygen 25.0

Yes, copying and pasting works.
But there are a lot of tables in the excel file and it's not convenient.
After running the conversion script, the join of the cells gets lost
2023-06-22_14-37-48.jpg
2023-06-22_14-37-48.jpg (97.3 KiB) Viewed 679 times
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: Excel to DITA join cells?

Post by Radu »

Hi,
I see, you are using our batch documents converter add-on.
We have an internal issue to improve the batch converter to also take into account cell spans, I added your feedback on the opened issue.
If we manage to fix it in a future version I will update this forum thread.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Gimber78
Posts: 7
Joined: Thu Jun 22, 2023 1:31 pm

Re: Excel to DITA join cells?

Post by Gimber78 »

HI!
Wrote a python converter
xlsx to xml(data)
there should be no empty "None" values in the original excel.
Accepts a file as input sample2.xlsx
On the way out output.xml
Maybe it will be useful to someone.

Tabl in excel
excel.jpg
excel.jpg (71.01 KiB) Viewed 576 times
tabl in xml
oxy_xml.jpg
oxy_xml.jpg (75.86 KiB) Viewed 576 times
out pdf
pdf.jpg
pdf.jpg (131.27 KiB) Viewed 576 times
convert.zip
(30.52 KiB) Downloaded 47 times
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: Excel to DITA join cells?

Post by Radu »

Hi,
Thanks for taking the time to post an update with your solution!
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Gimber78
Posts: 7
Joined: Thu Jun 22, 2023 1:31 pm

Re: Excel to DITA join cells?

Post by Gimber78 »

update, bugs fixed.
tables with more than 19 rows did not work (etc.)
converter_xlsx_xml_v4_.py.zip
(2.12 KiB) Downloaded 50 times
Post Reply