_______________________________________________________________________________________
using Application = Microsoft.Office.Interop.Excel.Application;
using EXCEL = Microsoft.Office.Interop.Excel;
using System.Reflection;
using System.Net;
using System.Data.OleDb;using System.Data.SqlClient;
using System.Web.Services.Protocols;
Kod kısmında da..
EXCEL.Application excApp = new Application();
EXCEL.Workbook excWorkBook;
excWorkBook = excApp.Workbooks._Open(txbDosyaArsiv.Text,
Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value,
Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value);
int rowOrder = startVal;
#endregion standart
Microsoft.Office.Interop.Excel.Worksheet excWorkSheet = (Microsoft.Office.Interop.Excel.Worksheet)excApp.Sheets.get_Item(1);
bool isMasterCreate = false;
new_importlogger xLoggerMain = null;
Guid xLoggerMainGuid = new Guid();
int aktarilan = 0;
while (rowOrder <= endVal) {
#region start_iteration
if (!isMasterCreate) {
xLoggerMain = new new_importlogger();
xLoggerMain.new_aktarilmakistenenkayitsayisi = Convert.ToString(endVal - startVal);
xLoggerMain.new_description = "Excel'den Arşive Çekme - Zaman : " + DateTime.Now.ToString();
xLoggerMain.new_importedilendosya = txtDosya.Text.Trim();
xLoggerMainGuid = service.Create(xLoggerMain);
isMasterCreate = true;
}
#endregion start_iteration
#region Exceldeki Gerekli Alanlar
string TamAd = ((Microsoft.Office.Interop.Excel.Range)excWorkSheet.Cells[rowOrder, "a"]).Text.ToString();
string AbonelikDurum = ((Microsoft.Office.Interop.Excel.Range)excWorkSheet.Cells[rowOrder, "b"]).Text.ToString();
string AbonelikBitisTarihi = ((Microsoft.Office.Interop.Excel.Range)excWorkSheet.Cells[rowOrder, "c"]).Text.ToString();
#region loop_iterationrowOrder++;
this.Text = rowOrder.ToString() + " . kayıt işleniyor!";
this.Refresh();
#endregion loop_iteration
}
#region end_Of_File
if (isMasterCreate) {
xLoggerMain = (new_importlogger)service.Retrieve(EntityName.new_importlogger.ToString(), xLoggerMainGuid, new AllColumns());
xLoggerMain.new_aktarilankayitsayisi = Convert.ToString(aktarilan);
xLoggerMain.new_description += ",Bitiş Zaman : " + DateTime.Now.ToString();
service.Update(xLoggerMain);
}
excWorkBook.Close(false, Missing.Value, Missing.Value);
excWorkSheet = null;
excWorkBook = null;
#endregion end_Of_File
Referans için de
COm kısmından
Microsoft.Office.Interop.Excel 'u bulup yükleyin , 12 veya 14.
ok ?
E2
--
You received this message because you are subscribed to the Google Groups "altdotnetturkiye" group.
To post to this group, send email to altdotne...@googlegroups.com.
To unsubscribe from this group, send email to altdotnetturki...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/altdotnetturkiye?hl=en.
To unsubscribe from this group, send email to altdotnetturki...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "altdotnetturkiye" group.
To post to this group, send email to altdotne...@googlegroups.com.
To unsubscribe from this group, send email to altdotnetturki...@googlegroups.com.
"boş sayfa geliyor" demiştim en başta o yüzden öyle yazdım kusura
bakmayın.sizde baştan bütün mailleri okumazsızınız haklı olarak :).
--
o kadar profesyonel değilim dediklerinizden birşey anlamadım :(
--