Print template with Excel

Hi guys,

After working with a few clients, we’ve realized that a lot of them use Excel to design their print template. This way it’s easier for them to change graphics or small parts like order of the fields. Although the new feature of drag and drop column fields is impressive but it still can’t fully control how the template looks.

Therefore, we have developed a module that can take in a Marked-up Excel file and output an excel that are fill with values. And currently it is working well. (Simple example: template and result ). There are more complicated one with row of items

However, because we can’t find any existing mark up language for this purpose, so we kinda create our own markups. And I think this is not very good since it’s non-standard and not well thought through. So I wanna ask if any one know any markup language that we can apply for this purpose. If there is, we will change to use that. It helps since we are parsing the markups ourselves which is error-prone.

And we will publish to github once done, currently it’s too raw.
Personally, I think it will be useful for a lot of companies, and it’s not complicated.

Nathan

1 Like

Is your module working fine with ERPNext?

I have created such format for Excise Invoice, You can make your own html format, there are lots of tool who convert excel into html, it works well for me.

@kolate_sambhaji Would it be possible to share your template? We have been trying to create invoice format for ourselves - though simple, I’m struggling with alignments. Yours look similar to what we need - If it is ok to share, could you please?

Thanks.

@kirthi Right now I do not have this format, I will check and share it with you.

If you have your format ready in Excel file, you can generate html code using excel file.
reference:


http://codebeautify.org/excel-to-html

2 Likes

yes, it is working fine with ERPNext. Thank you for the link to the converter.
But actually, the part they we wonder is about the Markup language to generate the Excel, not so much from Excel to HTML though

@nathan_dole
Frappe has csv generator, you can write code to generate csv, but I don’t know about formating excel with borders.

Using python you can do create Excel in xlsx format,
reference: http://xlsxwriter.readthedocs.io/
http://xlsxwriter.readthedocs.io/format.html

thanks @kolate_sambhaji, currently I am using xlsx javascript library but if we use python maybe the markup we can still use jinja. It’s great, thanks again!

1 Like

I have question here:
Why erpnext made the printing to be in PDF and did not give option to also print in Excel? Because if we need to print with borders, then Excel is better and recommended. Also, converting from PDF to Excel is not appropriate because if we are talking about borders, then mostly the conversion will be garbage.
Hopefully someone can advise as really I need to print some documents in Excel format.
Regards
Bilal

1 Like

Any updates, or custom apps for this? In need of printing to Spreadsheet ;p