I need to create a web app that will display data from spreadsheet (.xlsx) files. Preferably, this will be a Web API project, because the "spreadsheets" I need to host there lend themselves very naturally to a RESTful type of routing structure, such as:
locohost://[customer name]//[Report Name]//[YYYMMDD[_HH]]
e.g.:
locohost://Carmel_Roasting_Co//DailyCoffeeSalesByType//20151228
locohost://*$$//DailyCoffeeSalesByProfitMargin//20151225
locohost://Vienna_Morning_Brew//MonthlyCoffeeSalesByCurrencyType//201512
I've run into a roadblock as far as getting started with this in the Web API world, though; although there are many articles/tutorials on reading spreadsheet data and displaying it on GridViews in Web Forms projects, such as this one, but I haven't found anything for Web API.
What I'd really like to do is be able to load an .xslx file into the Web API app and have it display the spreadsheet exactly as it is formatted in the file, but if that is not possible, I may as well just save the .xlsx file as a .csv file and build it up from that data.
I could get the data by querying the database via the same Stored Procedures that are used for populating the spreadsheets in the first place, but this is in some cases a very long process; that's why it makes sense, if possible, to read the pre-generated .xlsx files rather than re-running the SP.
At first, users will be sent the .xlsx file[s] (attached to an email).
Later, they will get both the .xlsx files AND links to the web pages (transition period).
Still later, the web pages will replace the spreadsheet files altogether.
In fact, my idea as for the routing is that if a person browsed to:
locohost://Coffe_Beans_And_Human_Beans_Friends//DailyCoffeeSalesBySmiles//20151228
...and that report did not yet exist, it would be generated in the background via a call to the SP, but have to first inform the user that it will be a long wait. In the case of pre-generated .xlsx files, the appearance of the data would be much quicker.
So: is there a relatively painless (quick and easy) way of displaying Excel content as-is, or am I best advised to go the Web Forms route?