Hi Folks,
need some help to create tables, which will be displayed as webpages-HTML code, using WebBrowser control. Table will show catalogies of products (clothes), which needs to be displayed as HTML table.
Should be 4 categories of tables-reports: Women, Men, Kids, Combined, which will be chosen by hitting button: attached screenshot
Table should display separate cells: The Product name, Price, and Units In Stock. Like for example hitting "Men" button should display: Product name, Price, and Units In Stock.
The information needs to be pull out of doctext file:
Can use Mid(), Len() and Instr(), but no Split()
There is code, which is for reading one line only
Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim Price As Double
Dim UnitsSold As Integer
Dim UnitsInStock As Integer
Dim fileStreamReader As IO.StreamReader
Dim lineIn As String
fileStreamReader = IO.File.OpenText("../../Clothes.txt")
While Not fileStreamReader.EndOfStream
lineIn = fileStreamReader.ReadLine()
MsgBox(lineIn)
End While
fileStreamReader.Close()
End Sub
Why can't you use .split? That would be the obvious choice here
Also why do you say can use Mid() Len() and Instr() all of which are old VB functions rather than VB.Net which would be .Substring .Length and .IndexOf
I would say use split on linein and that will give you your values in a string array
Personally I would not use Excel at all, I would perhaps use a database and import the data into that or if the dataset is not to large I may consider using a class and a listof
Also may consider just treating the text file as a data source for a data adapter or reader as needed.
If you treat it as a data source then that means the data will be in fields, you just need to loop through your resulting reader and build your html from the data there. Should be pretty simple.
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.