Hi Guys.
I am new here, I am importing data from Excel to a datagrid in VB, I can get the data on there no problems and also save this back to a SQL database without any problems.
However I have a new spreadsheet which has the same product listed again and again with the same description but different totals, what I want to do is to upload this to the datagrid just once for each description, with a grand total of all the seperate totals, I hope this makes sense!
Any advice gratefully received!!
This is the simple code just to get all the lines displayed on the datagrid -
If objData(intRow, 2).value IsNot Nothing Then
If Not strDesc.ToUpper.Contains("DESCRIPTION") Then
strDesc = objData(intRow, 2).value
strVal = objData(intRow, 5).value
strVol = objData(intRow, 9).value
strWasteVal = objData(intRow, 11).value
End If
Else
blnOK = False
End If
Thanks!!
I am new here, I am importing data from Excel to a datagrid in VB, I can get the data on there no problems and also save this back to a SQL database without any problems.
However I have a new spreadsheet which has the same product listed again and again with the same description but different totals, what I want to do is to upload this to the datagrid just once for each description, with a grand total of all the seperate totals, I hope this makes sense!
Any advice gratefully received!!
This is the simple code just to get all the lines displayed on the datagrid -
If objData(intRow, 2).value IsNot Nothing Then
If Not strDesc.ToUpper.Contains("DESCRIPTION") Then
strDesc = objData(intRow, 2).value
strVal = objData(intRow, 5).value
strVol = objData(intRow, 9).value
strWasteVal = objData(intRow, 11).value
End If
Else
blnOK = False
End If
Thanks!!