Tag: #vbnet
3 articles
-
Import an Excel File into a DataGridView in VB.NET — Without Office or OLEDB
The usual OLEDB route stops on any PC without the Access Database Engine, and it guesses each column's type from the first few rows, so values that don't fit arrive empty. This VB.NET module reads an .xlsx file into a typed DataTable and shows it in a DataGridView: title rows above the header, dates, merged cells, leading zeros and the total row underneath are all handled. Code for ReoGrid V5 on .NET 10 and V4 on .NET Framework 4.8.
-
Export a DataGridView to Excel (.xlsx) in VB.NET — Without Office Interop
The usual Interop loop stops working on the first PC without Office, and it quietly turns a ZIP code like 02134 into 2134. This VB.NET module writes a DataGridView to a real .xlsx file instead: visible columns in screen order, numbers as numbers, dates as dates, leading zeros intact. Complete code for ReoGrid V5 on .NET 10 and V4 on .NET Framework 4.8.
-
Reading, Writing, and Displaying Excel Files in VB.NET
A practical guide to working with .xlsx files in VB.NET — reading data, generating reports, and embedding a live spreadsheet viewer inside a WinForms or WPF desktop app. Everything here works without Office installed.