|
-
Aug 29th, 2006, 09:02 AM
#1
Thread Starter
Member
Reading a File
How can read the file with the extension .mir
please help me out
-
Aug 29th, 2006, 09:28 AM
#2
-
Aug 29th, 2006, 10:31 AM
#3
Re: Reading a File
http://filext.com/detaillist.php?extdetail=mir
It's probably a complex file, so you should look to see if Bauhaus has any APIs you can use to understand the file. Else all you'll get is a bunch of gibberish.
-
Aug 29th, 2006, 11:55 AM
#4
Thread Starter
Member
Re: Reading a File
Hi all ,
I converted that .mir file to .xls file
but i need to read this .xls in asp.net letter by letter
bcoz the data excel is not in a table format
if there is any solution pls help me out
Thanks in advance
Sathish..
-
Aug 29th, 2006, 03:33 PM
#5
Re: Reading a File
In excel is it just a bunch of text within the first cell? If so you could use ADO.net to read the data into a variable, then go through it character by character.
-
Aug 30th, 2006, 04:16 AM
#6
Thread Starter
Member
Re: Reading a File
Hi Wild bill
can u plesae tell me how to read the excel cell through ado.net
thanks in advance
Sathish
-
Aug 30th, 2006, 08:03 AM
#7
Re: Reading a File
Try this
VB Code:
Public Function GetExcelData(ByVal fileName As String, ByVal sheetName As String) As String
Dim mySelectQuery As String = "select * from [" & sheetName & "$]"
Dim myConnection As New OleDbConnection( _
"provider=Microsoft.Jet.OLEDB.4.0; " & _
"data source=" & fileName & _
";Extended Properties=""Excel 8.0;HDR=No""")
Dim myCommand As New OleDbCommand(mySelectQuery, myConnection)
myConnection.Open()
Dim myReader As OleDbDataReader = myCommand.ExecuteReader()
' Always call Read before accessing data.
myReader.Read()
'get first value of first row
Dim info As String = Convert.ToString(myReader.GetValue(0))
' always call Close when done reading.
myReader.Close()
' Close the connection when done with it.
myConnection.Close()
Return info
End Function
-
Aug 30th, 2006, 09:23 AM
#8
Thread Starter
Member
Re: Reading a File
Hi to all i am able to read the file in to one string
but how to read the required characters(bytes) from that stirng
i mean how to read 1 st character to 5 th character like and so on....
is there any file sytem objects to read the whole string
pls help me out
thanks in advance
Sathish
-
Aug 30th, 2006, 11:57 AM
#9
Re: Reading a File
Now that you've got your text into a string, you can use string methods, specifically substring, to grab chunks of text:
VB Code:
For i as integer = 0 to info.length - 1
console.writeline(info.substring(i,1))
Next
-
Aug 31st, 2006, 10:05 AM
#10
Thread Starter
Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|