开发者

Fill in excel spreadsheet with randomised data using C#

开发者_运维百科

I want to fill in a spreadsheet that is directly linked to a C# application.

The excel would have 3 headers - i.e. Name, Age, Height, that can all have five different options of data to fill their cells in their columns, the output would be randomised when filling the cells and it would stop after say 100 cells in each columb had been filled.

I have looked into the autofill option in C# however not sure if this is the right way to do it. And I know I would have to make a standard template that the application could read the specific options of data then repeat.

Any input would be greatly appreciated!


It is possible to do the Age and height(this would require a formatting template) but as for name the only way would be slightly tricky and involve using a list of possible names saved into an array and then use the same random number generator for age to pick a name out of the array. I could write out some possible coding if you still need it Lambo old boy.


I'm not quite sure i know what you want, but to open and edit Excel spreadsheets you could go with the Odbc driver or use csv files instead.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜