I have a code similar to this below
C#Copy
I am currently experiencing a situation where the file is being downloaded but when I try to utilize excel to open the file, it gives the message
"Excel cannot open the file test_one because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file"
This just started happening, hence how do i get an actual excel extension for excel 2007 and above to replace it above.
Thanks in advance
C#Copy
C#:
using(webclient wc = new WebClient())
{
string fileinfoname = "test_one";
string pathinfo = @"C:\testfolderinfo" + fileinfoname + ".xlsx";
wc.downloadFile("www.testurl.com/report", pathinfo);
}
"Excel cannot open the file test_one because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file"
This just started happening, hence how do i get an actual excel extension for excel 2007 and above to replace it above.
Thanks in advance