Is it good to use Excel interop in an MVC.net application to Expose Excel calculations to web - asp.net-mvc

I have a web application developed with MVC.net. In this application i create a simple user interface to represent some cells of an excel file. When user change values of the UI it has to get reflected in the Excel file and needs to do some calculations and return results to the UI. I was using Excel interop for this solution and i don't need to save it back to the Excel.
Is this a fine solution or is it not a recommended one. If there are any other solutions please do let me know.
Thanks in advance.

Related

How do I import a Google sheet in a chrome extension project?

I wish to enhance an existing web page by adding statistics that can be regularly fed by a large amount of people.
I chose to use Google Sheets to retrieve the data so that anyone can access the tables and make their addition but I have no clue of how to display the sheet's results in the concerned web page.
In my case, I'm editing the webpage's text from Javascript.
I thougth of two tools that might help:
Importing the google sheet in Javascript (I can't find how to do that, an alternative would be welcome if not possible)
Importing the google sheet in Python and then exporting its results as an internal .txt file which I should be able to read with Javascript but that would require the .txt file to be updated every now and then.
Could you guys lend me a hand in how to do this?
Thanks in advance!

Printing a ticket in xpages

In a xpages application I need to mount a label with a certain layout, analogous to the layout of a ticket. Searching, I have verified that the most used practice is to use openoffice to design the odt model and in java to use bilbiotec to JOD Reports. Do you advise to follow this line yourself, or do you have any suggestions?
I would concur with Marcus. The way forward is PDF output. There are a couple of ways to do this, depending on your constraints.
When user must design every aspect of the ticket using openoffice is a suitable approach, however you need a headless openoffice install for the rendering
If everything can be code, then PDFBox is a good way to go. Wrap your code into a managed bean
The middle path would be XSL:FO and Apache FOP. It allows alteration of the layout by providing a different style sheet. I wrote an article series outlining that approach.
Let us know what works for you!
There is also the POI4XPages plugin. You could design your form with Word and then use placeholders to populate the document and output as a pdf.
See https://poi4xpages.openntf.org/main.nsf/project.xsp?r=project/POI%204%20XPages/releases/E80C4FC9FB07E1E4852580E3006E02C7
Download the latest version (1.4) at http://p2.openntf.org/repository.nsf/home.xsp/poi4xpages/snapshots
Howard
I was able to solve my problem, because I discovered that here in the company there is the abcpdf software. Through a web service that uses the APis of this software, I pass the html code of the ticket and the web service returns the pdf document in an array of bytes. I created a managed javabean to consume the web service and display the pdf in the browser.
Thanks to all who have contributed in some way with suggestions.

Can I use LinqToExcel for saving edited data to excel?

I am using LinqToExcel for sorting of data. I want to save sorted data back to excel. For that is there any function in LinqToExcel
As mentioned on the LinqToExcel project page, it is designed for querying data, not modifying data. So no, there is not anything built into LinqToExcel to allow this.
To modify an Excel sheet, you will need to use either the Visual Studio Tools for Office (VSTO), Open Office XML, or a third-party library that wraps one of these.

iPad app designing: sync with Excel file

I'm designing a new app for iPad for a small company. This app will use Core Data to store a local database and a database of products and prices. The last database needs to be always up to date since the prices can change.
This company, has a Excel file to keep this database of prices. So they don't have a SQL db to which I can interact from my app.
One option could be to export the Excel file in CVS and put that file in their server (accessible by internet). Then my app should parse the file.
I don't like very much this idea, though.
Do you have any suggestion?
I had a very similar problem to you. I recently got into a project where the client wanted to import information from an Excel file into an app. I know a lot of people say, just transform it into a CSV and parse it that way, but I really didn't want the client to go through yet another step and introduce a different file format - as simple as that may be.
I also really don't like having the information in the cloud, especially Google. Privacy is something that's important to most companies and I'd doubt they'd approve of you using Google to parse the info.
In order to parse the file, I created QZXLSReader. It's a drag-and-drop solution so it's a lot easier to use. I don't think it's as feature complete, but it worked for me.
It's basically a library that can open XLS files and parse them into Obj-C classes. Once you have the classes, it's very easy to send them to Core Data or a dictionary or what have you.
I hope it helps!
Here are a couple of options for you:
Use Google Doc as the intermediary. When the pricing Excel is updated by someone, simply upload the updated Excel to Google Docs. From your iPad app, you can read the latest data via the Goole API. If the company is up for it, they can move to Google Doc altogether and just modify the online Google Spreadsheet directly.
Use services like StackMob as the intermediary. You will have to write a tool to sync the pricing Excel with SrackMob but you can easily access the data via StackMob's iOS SDK.

ASP.NET: How to retrieve data from access/Excel file?

A company is creating a web site for the organization I work for. Since the web site is still being developed, some modules are not yet there. For instance, in order to print data obtained from a query, one needs first to export it to Excel or Access. Then, from Excel or Access, it is important to do some adjustments (adjust columns width and rows height, modify titles, so on) to make it easy to print.
I would like to create a small web application that will avoid us doing those operations manually. Unfortunately, the other application is in JSP/Java while I only know ASP.NET/C#.
How can I retrieve all this data, which are either in Excel or Access, and reload them into my application for printing?
Thank you
This guy did a brilliant article on getting data from excel using ado.net, I have written a program based on his instructions and it is working fine with Excel 2007 files, and can handle very long column data as well.
Link to article
Have you considered writing a macro in Excel instead of trying to do everything on the server? Creating a macro in VBA isn't difficult, and you can distribute it as an Add-In to your users. Takes some good instructions for them to install it, but avoids all the potentially messy issues of import/export of Excel files.

Resources