From xlsx invoice with merge tokens to invoice. Help in .net to work with Clarion Maybe Donald Ridley

Hi All,

I have an almost perfect free .net app that can change an xlsx template with merge tokens to an invoice xlsx, Given some data (from a database)

See:

WindowsFormsApplication2 app

I would like to change the WindowsFormsApplication2 to a console app with 3 or 4 parameters
1: (text)file name with tokens and their values (this file can be exported from a clarion app.)
2: xlsx template filename
3: target filename (after merge)
(4: executable filename (ie excel. exe) to open 3)

Has somebody enough experience to change the WindowsFormsApplication2 ?

As a concept i want to achieve

Why not just leave it as it is and pass command line parameters when you call this program?
Would this work for you?

All this is done directly from the Clarion application via the standard Microsoft Excel OLE interface.
It can be simplified using the paid Ingasoftplus EasyExcel 4.08 solution.
Then you can add intermediate text files and run from the command line.

There are likely several ways to approach this.

I’m curious as to why you want the .NET assembly ran as a console app?

Also, what version of Clarion?

As mentioned, you may want to check out Ingasoft’s EasyExcel. I’ve had good luck with their products.

As well as the other suggestions, have a look at this thread in case it gives useful options:

Here’s an example app using the GitHub library you referenced.

Clarion app is C11.

Just a simple .NET DLL being called from Clarion. No OLE needed.

Also check out:

https://clarionmag.jira.com/wiki/spaces/clarion/pages/400219/Clarion+and+C+.NET+Interop+without+COM

1 Like

Hi Don,

Just back from a holiday. Thank you! A quick compile of the 2 sln works already. I already have a (delphi) console app which can merge a text file with tokens and their values (from clarion) to word. Fast and works multi user/network. In this case it 's not necessary but i need to transport data from 1 invoice from a clarion app to Don’s Excelmerge. Maybe with sqlite? Asinoai has also a SqliteExporter .net example program.

Hi All,

After all the delphi console app can merge any template text file. I use rtf for ms Word, html for E-mail and forgot about xml for ms Excel and Calc. .

Special thanks to Don Ridley

1 Like