SQLite User Forum

iMPORT/EXPORT VB.NET CODE
Login

iMPORT/EXPORT VB.NET CODE

(1) By Leonard Gray (LeonardGray1226) on 2022-08-17 20:49:26 [link] [source]

Hi All,

Is there open source VB.net code posted on this site that I can use to perform import and export of both Excel and CSV files to SQlite3 data tables?

(2) By Larry Brasfield (larrybr) on 2022-08-17 21:39:49 in reply to 1 [link] [source]

There is no such code on this site, whether closed or open source, in any of the .Net languages.

There is public domain C code which can import CSV that could be translated to VB or used via P/Invoke. It adheres exactly, as far as I can tell, to RFC 4180. Of course, writing CSV is a little easier, albeit tedious with the quoting required by that standard.

Also, as you are likely aware, there are some fine .Net libraries for reading and writing Excel files. Also as I recall, there are ADO adapters available for such files which can be used from .Net modules. (I would offer more detail, but it has been years since I used them.)

(3) By Leonard Gray (LeonardGray1226) on 2022-08-17 21:50:44 in reply to 2 [link] [source]

Thank you, Larry!

(4) By jose isaias cabrera (jicman) on 2022-08-18 12:59:42 in reply to 2 [source]

You can also use the COM devices that come with every windows installation to use Excel, or any other application that you want with JScript or VBScript that come with windows also.

JScript

var xl = WScript.CreateObject("Excel.Application");
xl.Visible = false;

VBScript
Set IE = CreateObject("Excel.Application") 
IE.Visible = 1 

You can use these COM objects to open any application that are enabled with COM libraries.

(5) By Leonard Gray (LeonardGray1226) on 2022-08-19 00:59:23 in reply to 4 [link] [source]

Thank you, Jose !