Jiwa 7 with Excel VBA  Topic is solved

Discussions relating to plugin development, and the Jiwa API.

Re: Jiwa 7 with Excel VBA

Postby perry » Tue Sep 04, 2018 4:52 pm

Last couple times I had to work with Excel data import, I made Jiwa to import the file instead of calling Jiwa objects inside Excel. It is just much easier that way.

If you have to, it is possible call REST from VBA, few things you need
- MSXML2.ServerXMLHTTP
- ScriptControl (for converting JSON to object)
- If you are dealing with 64-bit version of Excel, you need
https://stackoverflow.com/questions/972 ... l-2010-x64
Perry Ma
S. Programmer
Lonicera Pty Ltd
http://www.lonicera.com.au
perry
Frequent Contributor
Frequent Contributor
 
Posts: 173
Joined: Mon Oct 27, 2008 2:26 pm
Topics Solved: 15

Re: Jiwa 7 with Excel VBA

Postby Scott.Pearce » Tue Sep 04, 2018 5:51 pm

I'd avoid trying to talk to .NET assemblies from VBA (COM). As others have pointed out, there are dragons there. All I can suggest is an alternative approach:

Add an "Import from Excel" button to the sales order entry form ribbon menu.
Clicking the button presents an open file dialog, user selects xls(x) file.
.NET plugin code could then use the Excel objects. I'd even go so far as to dump the xls(x) file straight out to a temp CSV file, then use .NET libraries to work with the CSV data rather than using the Excel objects. Makes it more generic.
Scott Pearce
Senior Analyst/Programmer
Jiwa Financials
User avatar
Scott.Pearce
Senpai
Senpai
 
Posts: 742
Joined: Tue Feb 12, 2008 11:27 am
Location: New South Wales, Australia
Topics Solved: 221

Re: Jiwa 7 with Excel VBA

Postby SBarnes » Tue Sep 04, 2018 5:58 pm

I have learnt never to disagree with Scott when he is right as this is being made more complicated than it needs to be :lol:
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1619
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175

Previous

Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 16 guests

cron