TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Hari B
NA
139
67.6k
Excel reading
Nov 3 2015 8:33 AM
Hello All,
Here i am using EPPlus dll and read the excel.
below my code:
public JsonResult UpdateFHSerialNumber(string strExcelPath)
{
try
{
string cell = string.Empty;
Stream str = strExcelPath;
//FileInfo file = new FileInfo(Request.Files["file_Rel_FH_SrNum_Name"].FileName);
using (ExcelPackage excelPkg = new ExcelPackage())
{
ExcelWorksheet oSheet = excelPkg.Workbook.Worksheets[1];
cell = oSheet.Cells[4, 3].Value.ToString();
}
return Json{ error = read sucessfully});
}
in above code i comment fileinfo it's working in local system not working in server.
if working with action results it's working. but i need JsonResult so suffering with path
if i am using action results
public ActionResult Index(HttpPostedFileBase file)
i get excel file and read easy but i am using Jsonresult i get only path how can i read excel file using path
Reply
Answers (
1
)
about whatsapp
what is cms