Tag: vb.net

Insert value beside imported data from Excel into SQL Server via vb.net

I am facing an issue as below: I’m creating a daily performance management tool, so I need to import Excel files into a SQL server table and I need to import these values with a specific date to be picked from a textbox control. I can import normally from Excel into the database but can’t […]

Auto increment in vb.net

I am using visual studio 2013. I created a windows application form in visual basic and using that I am entering data in excel. I wrote a code to auto-increment a unique number which needs to appear as soon as form loads. But instead of appearing at that time, when i enter first data through […]

how to insert text from a textbox into next empty cell in excel using vb.net

I tried searching on google and going to other forums searching for help on a particular problem. But i couldn’t find any of the answers that I’m looking for or the code just doesn’t want to work for me. My problem is that i have 5 textboxes, each with different values that the user inputs. […]

Selecting Through only visilble Excel rows through vb/asp.net

is there a way to select visible columns in excel using vb.net/asp.net. I have this project that needs the certain rows of excel to be selected without selecting the hidden one. i have this query Select [BONUS],[PROGRAM], [COST/30s],[TARPs],[SPOTS – 30s ],[TOTAL COST – 30s ],[TOTAL TARPs – 30s ],[COST/15s],[SPOTS – 15s],[TOTAL COST – 15s ],[TOTAL […]

Interop with Excel 2016 in Visual Basic Express 2010

I am working on a project I have in mind. I want some of my calculations to be done in Excel as it is much easier there. The Excel will just be my computing back-end while the user will mainly interact with the Visual Basic front-end for user-friendliness. From what I remember on my undergraduate […]

Excel VBA Code to ignore filtered-out (hidden) rows

I have a piece of VB code in excel to hide columns with less than 2 data entries (header as a minimum) and I need to know how to use this to hide columns whilst ignoring information in filtered out rows: Sub HideCols() Dim LC As Integer, j As Integer Dim cl As Range, rng […]

Delete xmlns=“” and ns1: from XML-File using VB.Net

Help me please with this problem: I have Excel-file and try to generate XML-file using VB.Net and XDocument/XML Literals… After generating there is a file: …. <Payload> <ns1:BidSet xmlns=”http://… xmlns:ns0=”http://…. xmlns:ns1=”http://….> <tradingDate xmlns=””>2016-10-31</tradingDate> <PTPObligation xmlns=””> …. …. </PTPObligation> </ns1:BidSet> </Payload> …. empty But I need to delete here empty xmlns=”” from all tags(nodes) and delete […]

Form is shown in Visual Studio testing, but not when opening Excel template

I have an .xlt (Excel template) file where I have the following event handler: Private Sub ThisWorkbook_New() Handles Me.[New] Dim loginForm As New LoginForm loginForm.Show() End Sub When testing file in Visual Studio, the loginForm shows when the file is opened just like it should. However, if I open the file outside Visual Studio, the […]

Inserting Excel to Sql database SQLBulkCopy method

I am trying to insert Excel data into SQL Server 2008 database. I tried the SqlBulkCopy method to try to insert my data to the database and it runs without error, but it inserts each Excel record twice into the database. (The original data has 249 records, the inserted data has 498 records). I tried […]

Workbook sharing vb.net

I have a windows application form created in visual studio 2013. I need to enter data from form to excel sheet until the users close the form. The workbook will be shared by multiple users at the same time. Moreover, I do not want them to see the workbook unless they open it. How do […]

MS Excel Spreadsheet is the best Office Software, Excel VBA and Excel Formulas make Spreadsheet work faster.