Language/framework to write Excel spreadsheets, webbased - excel

I need to make a webpage (from scratch) that will interrogate a SQLite database (with a predetermined query) to produce an Excel compatible spreadsheet. I need to find a lightweight solution to implement this, but don't know where to look and what is recommended.
The page itself will be fairly vanilla, only takes two dates as input, and the query will be pretty much a single table dump between those two dates. I'm interested in how to port the data to a spreadsheet.
EDIT: Framework should have some sort of stock SQLite package.
P.S.: Can be for use with Excel 2007 (XLSX) or older. Which ever way it goes, the page will be set to one or the other, not both.

Maybe PHP and PHPExcel will suite your needs.

Related

Same spreadsheet structure and formulas but different data

I have a dozen spreadsheets with identical structure and formulas, essentially tables, only the data differ, say one spreadsheet per country.
For example there is a spreadsheet to manage the US employees, another for the UK employees, and another for the Canada employees.
They are exactly the same except that each will store a different set of employees.
The spreadsheets act both as a database to store data and a user-interface to interact with data.
Each change (updating or adding a formula, updating some drop-downs values, changing style...) has to be replicated in all the spreadsheets which is time consuming and error-prone.
As an example I could change the formula to compute the seniority of each employee by editing the 3 spreadsheets.
I was wondering if there was a reasonably simple way to avoid duplicating the common parts, only having different data.
I'd like to avoid a full-blown development with plenty of VBA code, a complete database, some user input forms... but if really necessary I can write some VBA and build some database to fill in the blanks if there is no out-of-the-box solution.
With a full-blown development I would do something like:
store all the employees in a single SQL database table
develop a single spreadsheet
when opening the spreadsheet ask the user to choose a country to only load the this country's employees
save the data changes to the database
If you're effectively talking about an efficient way to handle version control so that input sheets that have previously been distributed to users match a master template, then I'm afraid there is no out-of-the-box solution.
I use something along the lines of http://datapigtechnologies.com/blog/index.php/building-version-control-in-excel/ to force users to download the latest template should they be using an older one.
In addition, I also place a big note at the top to prompt users to download a new template each time, rather than recycle an old one, because if a user didn't enable macros the automatic download of the latest template won't kick in.
Note that the above screenshot shows a form that I've built in Excel's grid itself, using shudder merged cells. (i.e. It is not a userform)
If the templates need to preserve user-submitted data that isn't held centrally, then you're probably going to need to develop an add-in along the lines of what the authors do in the book Professional Excel Development.

Excel Files and Visual Basic

I have never used Visual Basic before but could do with a pointer on where to begin.
I have 750 excel spreadsheets that contains various amounts of data of different types. The columns are always the same, but the number of data rows vary per spreadsheet. I need to extract data and put it into two new spreadsheets.
Obviously to do this 750 times manually would be a nightmare. I just want to run a script that can do it for me and thus thought of Visual Basic although i've never used it before.
My specific questions are:
What type of command should i research that would allow me to copy data where the row number to start at varies (as data above varies in no of rows). There is a title before this new data - how can i get it to search for this title and then choose the row below?
Would all my spreadsheets have to be in one folder so that the script goes through them all, or can i have some kind of folder structure in that folder too?
Anyone recommend any good resources for me to get to grips with visual basic and grasp what i need to do?
thanks
Tom
So the compilation task got easier with the introduction of MS PowerQuery. If you are using MS Excel 2013, you already have this. If no, you should download it and use the extension from MS.
The following guide outlines how to Using Power Query to Combine Data from Multiple Excel Files into One Table. This means that with Power Query (PQ), MS has taken and enabled easy aggregation using a few simple button clicks. PQ is a lightweight alternative to a lot of tasks that used to require VBA.
In this example, you will use PQ to point to an entire folder (750 should be no problem) worth of commonly formatted Excel files. The only limitation is that each data file should have a similarly named tab.
I won't repeat the details of the guide for how to do it, as it is in-depth and visual. But if you run into issues, get in touch.

Import Historical Records from Excel to Custom App

I need a bit of help. My company has data in multiple excel sheets. Some sheets are straight forward (in that they easily map data types). But most of them are merged rows and cells etc within one header. I am developing an application in c# for maintaining a massive database with proper user and role management and multiple departments as stake holders.
I have identified the relations from within the excel sheets and all is well. What I cannot understand is how to import that historical data to map to the data tables? Basically, when a new custom system is designed, how would you import senseless data within it?
The only thing I could think of was writing a utility program that reads every row and every cell of the excel sheets and then extract the required values to insert to the proper database table. But this would take ages due to the numerous number of excel sheets.
Wondering anyone of you went through the same thing as I have?How did or would you handle this?
Many thanks guys :)
If the data is not regular, you've got a world of pain ahead of you. The object model in Excel can be driven by any of the Windows Scripting Host languages, like VBScript and JScript. In fact, most scripting languages have some support for Excel traversal.
However, as you've already noted, the data layout isn't the same across all spreadsheets. I had a similar problem years ago traversing SCADA data from power stations: each station did it slightly differently and changed their format from time to time.

What is the best way to import data from sophisticated formula enriched Excel files into SalesForce.com?

My current employer (to remain nameless) has a collection of incredibly sophisticated Microsoft Excel 2003 worksheets (developed by contractors, also to remain nameless).
The employer is replacing the Excel-based solution with a SalesForce-based solution (developed by other contractors, likewise to remain unnamed). The SalesForce solution is also very complex using dozens of related objects and "Dynamic SOQL" to contain the data and formulas which previously was contained in the Excel-based solution.
The employer's problem, which has become my problem, is that the data from the Excel spreadsheets needs to be meticulously and tediously recreated in .CSV files so it can be imported into SalesForce.
While I've recently learned I can use CTRL-` to review formulas in Excel, this doesn't solve the problem that variables in Excel have cryptic names like $O$15. If I'm lucky, when I investigate $O$15, I'll find some metadata explaining if n cells up and/or some other data m cells to the left, and/or (in rare instances) there may be a comment on the cell.
Patterns within the Excel spreadsheets are very limited, rarely lasting more than 6 concurrent rows or columns and no two sheets which need to be imported have much similarity.
Documentation of all systems are very limited.
Without my revealing any confidential data, does anyone have any good ideas how I might optimize my workflow?
It's not clear exactly what you need to do: here are 3 possible scenarios, requiring increasing knowledge of Excel.
1. If all you want is to convert the Excel spreadsheets into CSV format then just save the worksheets as CSVs.
2. If you just want the data and not the formulae then it would be simple (using VBA) to output anything that isn't a formula (the cell.Formula won't start with =).
3. If you need to create a linkage excel-->csv-->existing Salesforce objects/SOQL then you will need to understand both the Excel Spreadsheets and the Salesforce objects/SOQL that have been created. This will be difficult unless you have good knowledge and experience of Excel and also understand what the salesforce App requires.
Brian, if you're still working on this, here's one way to approach the problem. I use this kind of process often for updating data between SFDC and marketing automation apps.
1) Analyze the formulae that you're re-creating in Salesforce.com to determine what base data fields you need (stuff that doesn't have to be calculated from something else.
2) Find those columns/rows in your spreadsheets and use Paste Special -> Values in a new spreadsheet to create an upload file with values instead of formulae that you need for each data area (leads, prospects, accounts, etc.)
3) If you have to associate the info with leads or contacts or accounts and you have already uploaded or created those records in Salesforce.com, be sure to export them with their ID numbers. That makes it easy to use the vlookup formula in Excel to match up fields that you need to add and then re-upload the data into Salesforce.
Like data cleaning, this can be a tedious process. But if you take it step by step it shouldn't be too hard. Good luck.

What's the easiest language/api/webapp to build a public calculator for simple 4-5 equation functions?

Most of what I need to accomplish is doable with Google docs spreadsheets, except locking only certain fields to allow updates by the public so they can do their own calculations based on the data. I would like the lowest method entry cost of writing simple table data with some functions that allow user update/selection. Free form portable/gadget style would be terrific.
I imagine excel could do a lot of what I'm looking for but I don't think it would do what I want without a download of the excel doc, or making someone copy off my google doc spreadsheet to their own, thus losing automatic updates made to the sheet if they just use mine.
I've been trying to do this off and on in asp.net mvc, but when I have full c# to fall into, my feature creep eats me up and I don't finish what I accomplish in 30 min in a spreadsheet.
you can write very basic HTML page with few fields and formulas calculation in JavaScript.

Resources