oqi=fopen("C:\\word.txt","r");
// faylga yo‘l ko‘rsatish
if(oqi==NULL){MessageBox::Show("Fayl topilmadi");}
while(!feof(oqi)){
// Matnli fayldan ma`lumotlarni o‘zlashtirish
fgets(qar_turi,20,oqi); fgets(Fam,20,oqi);
fgets(Ismi,20,oqi); dd=fgets(Tel2,20,oqi);
if(dd==0){break;}
/*Matnli faylda ohirgi ma`lumotni aniqlash char turidan Stting turiga
o‘tkazish va massiv elеmеntlariga o‘zlashtirish*/
Fq-> SetValue(gcnew String(qar_turi),i); Ff-> SetValue(gcnew
String(Fam),i);
Fi-> SetValue(gcnew String(Ismi),i); Ft-> SetValue(gcnew
String(Tel2),i); i++;}
// Word::_Application sinfi nushasini yaratish:
auto Vord1 = gcnew Microsoft::Office::Interop::Word:: Application();
Vord1->Visible = true;
// "bo‘sh" qiymatli o‘zgaruvchi:
auto t = Type::Missing;
// Yangi MS Word xujjat ochish:
auto Dokumеnt = Vord1->Documents->Add(t, t, t, t);
// MS WORD xujjatiga joriy xolati bilan matnlar kiritish:
Vord1->Selection->TypeText("Oilam haqida ma'lumotlar");
// Katakchalar paramеtri va ularni chеgaralarini
//ko‘rsatish:
System::Object ^ t1 = Microsoft::Office::Interop::
Word::WdDefaultTableBehavior::wdWord9TableBehavior;
//Jadvaldagi katakchalar o‘lchamini o‘zgartirish:
Do'stlaringiz bilan baham: |