الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

كيف يمكن التحكم بصفحة ال excel باستخدام c#

مغلق
بدأه Eng.Helmy في 3 أغسطس 2007 · 6 رد · 1,335 مشاهدة · في Microsoft Visual C#.NET
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

السلام عليكم ورحمة الله وبركاته

كيف يمكن ارسال البيانات من برنامج السي شارب الى الاكسيل

والعكس

وجزاكم الله خيرا

#2

My Learning mode

Using Excel with c#

At First Note that

*Excel Application Contains Excel.Workbook

*Excel. Workbook Contains Excel.WorkSheet

*Take care that Excel is one based

Step 1:

Preparing Application to deal with Excel

-Add reference

-Com

-Add Microsoft Excel 9.0

-use the library

Ü This will allow you to work with Excel

Step 2:

-make an object from

Microsoft.Office.Interop.Excel.Application

Example:

Microsoft.Office.Interop.Excel.Application ExcelApp

=new Microsoft.Office.Interop.Excel.Application ();

Ü-This will run Excel without opening the book after you set ExclApp//object

ExcelApp.Visible=false;

Step 3:-

-object missing = System.Reflection.Missing.Value;

// Empty object because i dont want to send anything

-Microsoft.Office.Interop.Excel.Workbook;

-objBook=MyExcelApplication.Workbooks.Add

(missing);

Ü the result of step three is to open Empty Excel book

Step 4

-Microsoft.Office.Interop.Excel.Worksheet objSheet = (Microsoft.Office.Interop.Excel.Worksheet)objBook.Sheets["Sheet1"];

-objSheet.Name = "It's Me"; ----- *

-objSheet.Cells[1, 1] = "MHM";

Ü at this step I change sheet tab name -----*

Then write in first cell

So as I see throw this tutorial you can Deal with Excel

Good Luck

Prepared by

Eng.helmy

#3

السلام عليكم

قبل الشروع في تلك المراحل قم بتحميلOffice XP PIAs حيث تجد المكتبة الرئيسية Microsoft.Office.Interop.Excel.dll

Good luck

Ben_Laiid

#4

u can use ADO.NET to communicate directly with EXCEL without any referencing using OLEDB

#5

السلام عليكم

أخي رجاء أكتب بالعربي ليسهل فهمك

ado.netليست كافية بمفردها وهي موجودة في الsdk الذي أشرت إليه

#6

آسف على اللغة و الاستعجال فى الرد و لكن كيف لا تكون OLEDB فى ADO.NET كافية بمفردها

تم تعديل هذه المشاركة بواسطة ASDen في 14 أغسطس 2007 في 19:02

#7

وعليكم السلام ورحمة الله وبركاته.

ربما ينفعك ماهو موجود في الموضوع التالي :

/index.php?showtopic=79627

#Read

http://MoutazShams.blogspot.com

projects003.gif

أعتذر عن التغيب هذه الأيام نظرا للانشغال المريب

هذا الموضوع مغلق.

مواضيع مشابهة

عدد الزوار حالياً

المتواجدون خلال آخر دقيقتين · يتحدّث كل ٣٠ ثانية

—الإجمالي—أعضاء مسجّلون—زوار بدون تسجيل

جارٍ التحقق من المتواجدين…