2
Answers

I have a task to read a excel file using asp.net.

M B

M B

9y
648
1
Hello,
I have a task to read a excel file using asp.net. My problem is that I have excel file containing text in different fonts like some text in "Times New Roman" and some text in "Shri Dev 078e". I didn't get any solution how to achieve the desire result. Example the below text:

eãX "OFFICES" Ho$ Ajam| H$mo AbJ-AbJ {H$VZo VarH$m| go gOm`m Om gH$Vm h¡?

In the above text containing font "SHREE-DEV-0708E" as well as "OFFICES" in Times new roman.
when i store that text in my db i have to store the text with font name as well.

Is their any logic to put some kind of special character within start and end of the word which is in different font.
Answers (2)
0
Abhishikt Kujur

Abhishikt Kujur

NA 3 0 18y
Hi all,
        After searching a while i got some results...I had to search files from a server location so it was needed a path to map with server which I did using,        
                            string StrRoot_E = Server.MapPath("../FolderName1/");
var StrRoot_E contains the string "../FolderName1/" is the path for the specific server Directory and to extract files of specific types,
                           string files_E() = Directory.GetFiles(StrRoot_E, "*.zip");
"*.zip " is the filetype which is stored in an array of strings,and then you can extract each file from that array of strings and can use for purpose.

Method Server.MapPath() takes string argument which is the physical path in your server while method Directory.GetFiles() takes two arguments, the Path of the Directory and the fileType both as strings.