Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protected void btnRefrescar_Click(object sender, EventArgs e)
- {
- string fileLocation = ruta();
- Session["fileLocation"] = fileLocation;
- if (fuImportarArchivo.HasFile)
- {
- btnRefrescar.Visible = false;
- lblArchivo.Visible = false;
- fuImportarArchivo.Visible = false;
- }
- }
- [WebMethod]
- public static string Importar_Excel()
- {
- Transacciones t = new Transacciones();
- string dir_archivo = HttpContext.Current.Session["fileLocation"].ToString();
- DataTable dt = new DataTable();
- dt = ExcelToDataTable(dir_archivo);
- System.Web.HttpContext.Current.Session["dtExcel"] = dt;
- string datos = JsonConvert.SerializeObject(dt, Formatting.Indented);
- return datos;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement