0

I have a web page which I want to convert to excel. I have created an HTML file with a gridview and then convert it to excel. The problem is that in the excel file, some of the columns are shown in the general format and like this 6.5E15. However, they are credit card numbers and should not be shown this way. So the user has to change the cell format to number manually to see the whole credit card number. What should I do to make this right in my code.

farnoush resa
  • 403
  • 5
  • 7

1 Answers1

0

Well, I read the posts but they did not help me. At last I used the String.format function and changed the format of the string and put some spaces in the middle of it so that excel would not be able to change it to a number. Therefore 6037991497126305 was shown as 6037 9914 9712 6305. Well It solved my situation because the card numbers are usually written this way and it wont confuse anyone. But I still do not know how to solve this in other situations.

farnoush resa
  • 403
  • 5
  • 7