شباب انا اريد اعمل برنامج اسمه ادارة الملفات عن طريق الانترنت بس الحين
اريد اعرف كيف
اقدر افتح ملف ورد او اكسل ووووو :S
مع
asp.net with
#C
or
with visual basis
شباب انا اريد اعمل برنامج اسمه ادارة الملفات عن طريق الانترنت بس الحين
اريد اعرف كيف
اقدر افتح ملف ورد او اكسل ووووو :S
مع
asp.net with
#C
or
with visual basis
تم تعديل هذه المشاركة بواسطة goldstar929 في 14 يوليو 2008 في 13:04
Hello
I Understod that you wanna To Read and Write From File such as (Excel Sheet,Txt File)
okay:
Every File Have a Different Way To Connect To Your Application:
** Txt File:::
You Have To Creat a StreamReader To read from it or StreamWriter to Write into it like this:
dim file_to_read as StreamReader=new StreamReader("Here The Path Of Your File")
dim txt as String=file_to_read.ReadLine() <== read only line from file.
dim txt as String=file_to_read.readtoend() <== read all the file.
dim file_to_write as StreamWriter=new StreamWriter(" Here The Path Of Your File")
dim txt as string=" Somthing To Write"
file_to_write.writeline(txt)
** Excel Sheet or any office files
You Have To Connect Through The Connection Control
1) Creat OleConnection
2)Configure The PathString Of The Connection ..It Wil Be like
" Prvider 1.4 Ole........ect"
3) Creat DataSet and DataAdapter To Read/Write From File With SQL Statment
I Hope That Help