سلام من کد زیر رو نوشتم
string[] Question = new string[50]; // ' Check if any file is selected. if ((FileUpload.HasFile)) { if (!Convert.IsDBNull(FileUpload.PostedFile) & FileUpload.PostedFile.ContentLength > 0) { // Save the file in the root folder. FileUpload.SaveAs(Server.MapPath(".") + "\\" + FileUpload.FileName); // Create Ms-Word objects. Word.Application objWord; objWord = new Word.Application(); Word.Document objDoc; try { // Open the Word file in "ReadOnly" mode. objDoc = objWord.Documents.Open(Server.MapPath(".") + @"\" + FileUpload.FileName, ReadOnly: true); if (objDoc.Tables.Count != 0) // Check if Word file has any tables. { if (objDoc.Tables[1].Columns.Count > 0) // Check if the table has columns. { int iTotalCols; // Get total columns in the table. iTotalCols = objDoc.Tables[1].Columns.Count; int iTotalRows; // Get total rows in the table. iTotalRows = objDoc.Tables[1].Rows.Count; int iRows, iCols; text = objDoc.Tables[1].Cell(5, 1).Range.Text; } } }
دقیقا همون سلولی از جدول رو که میخوام میره برام میاره متنشو ولی الان به مشکلی که خوردم اینه اگه تو سلول جدول یدونه عکس یا فرمول باشه نمیاره یا اینتر زده باشه کاربر نمیندازه لطفا راهنمایی کنید خیلی ضروری و فوریه
هیچ کاربری تا کنون از این پست تشکر نکرده است
با ما تماس بگیرید تا در این مسیر همراهتان باشیم :)