Edit Excel table data in SharePoint using forms - sharepoint

I have an Excel table with data but here the rows and columns each have meaning, for example:
ColHead1 ColHead2 ColHead3
RowHead1 Data11 Data12 Data13
RowHead2 Data21 etc. etc.
RowHead3
I would like users to edit the data using SharePoint forms.
I've considered the following options
Flatten the data and manually add editors for each field onto the form (so that I can simulate some sort of grid layout). This may become unmanageable if I need to make a change though.
Insert the data into a list and let SharePoint create a default form, but this will also flatten the data.
Is it possible to somehow use the data in SharePoint directly in a List (or lists) without flattening?
Or should I just post the Excel sheets for direct editing in SharePoint?

You are right. 2-D data cannot be handled by SharePoint.
The best solution here would be to use Excel Services.
In 2007, Excel Services did not allow to write changes to backend file. I am not sure if the situation has changed with SharePoint 2010. You might have to check it out.
You can also put Excel file in document library itself.
However, what I am missing here are the business objectives for this requirement. What essentially do you want to achieve by putting this data in SharePoint forms ? May be there is some better way which others will be able to suggest if they know actual requirements.

Related

Create Excel metadata using VBA to filter in sharepoint

I am trying to use metadata from an Excel file to use for filtering in our sharepoint libraby.
The excel file already contains dropdown menus to pick certain values from, which are then used to create a very lengthy filename. However for our new sharepoint libraby I would like to move those to metadata, so it can be made visible in sharepoint columns and users can filter.
The file is a template that should be filled by users and when ready saved after choosing certain values.
The creation of the filename is done in VBA and therefore all values I want to use are available there.
I've tried a number of approaches I found in forums using e.g. customdocumentproperties and made it work...sometimes... While it worked in the beginning, I cannot make it work now.
It seems changing the metadata is a problem. Creating the metadata fields for the first time worked, but then changing it, did not. I have the feeling I do not understand some basics on this action. Microsoft websites are not of any help here...
What is the best - flawless - way to use VBA to create, add, change metadata in the excel-file that can be made visiblle in the sharepoint library? And are there any typical problems?

Updating a sharepoint list from Excel

I know this is a little backwards, but unfortunately this is what I have to do based on what I have to work with. Essentially we are getting data from one place, putting it into Excel and then running some pivot tables and then copying and pasting the results to Sharepoint. There is no way of getting the data into SharePoint from its initial source.
So here are the steps I have to do on a daily basis:
Go into 3 lists on sharepoint and delete the current data in there
Copy the data from each excel table and then paste it into the associated SharePoint list
Go into the Titles, etc part of SharePoint and update the file name to append the current date to it(ie change it from Data05032017 to Data 05042017)
I would like a way of automating this on a daily basis from Excel by simply pressing a button via VBA or if there is a way I can accomplish this wia linking somehow that would work too(not sure if its possible, I know you can link from SharePoint to Excel but unsure if you can go in the reverse direction).
So I first would like to know if this is possible and then if it is, how I go about doing it.

Creating a Sharepoint Report

I work for a fairly large hospital in their Decision Support Department. We have several tools at our disposal for querying data, but our way of distributing the information could use some work.
We typically run our query and then copy and paste the data into Excel. From there we create graphs and crunch some numbers before sending the Excel file out via email.
We've recently been given access to our own Sharepoint site and so far it looks promising for document distribution. What I'm wondering though is this; what kind of functionality is built into Sharepoint for building reports that run automatically.
It would be great to take a whack of our monthly query to Excel reports and set them up to run automatically via Sharepoint.
I did some reading about Sharepoint lists and that seems promising, but I thought I'd ask here for the best way to go about this - provided it's even possible.
I guess a good first step would be how to create a report in Sharepoint?
I'm going to assume you're using Sharepoint 2013 and Office 2013.
You have a couple options available to you with Excel and Access. Both methods I'll briefly describe can be automated. In either case, you will need Lists, as they can connect to Excel and Access as tables.
For the Excel route, simply choose the "Export to Excel" option in a SharePoint list. This will create an Excel version of your list, but it's more than a static workbook--that workbook retains a one-way link from SharePoint to Excel, so you can refresh the spreadsheet to reflect the most up-to-date version of your SharePoint list. Furthermore, you can link multiple Lists to a single workbook--you'll have to export each list to Excel individually, but each worksheet will still retain its link to its respective list after you consolidate the spreadsheets into a single workbook. You can save this workbook wherever you like, it'll still keep the link. I personally like to set my linked workbooks up with macros that automatically refresh the spreadsheet whenever file is opened, but that's just me. The reason you might consider this option would be to avoid having to recreate the work of creating graphs and whatever other analytics you're doing--you may well be able to set yourself up such that the graphs and analytics pull live from the table that's coming in from SharePoint.
*Do note that changes you make to list data in Excel isn't sent back to SharePoint--this is done to protect your list.
For the the Access route, you can import a list into Access as a table. This option creates a dynamic link to your SharePoint list the same way the Excel option does--the link is one-way and what you do in Access won't be sent back to SharePoint. You can create queries and reports as you normally would after the table is imported.

Cleaning People/Group Data Exported from SharePoint 2010 Lists

If you have a list with a People/Group data type that allows multiple selections, the data you get in an Excel export is a bit dodgy.
Example:
Instructors:
Berry, Patrick;#10;Smith, John;#136
Is this just something I need to deal with in Excel, because it makes reporting based on people filtering somewhat challenging.
Excel would be the best place to deal with it. The formatting is a part of how SharePoint store the data in the underlying field.
The field is formatted #[list item id]; [list item name]; where the id comes from the Site collections list of users.
The issue with reporting is that you would probably want a separate line for each user in order to use any of the pivot functions in excel. This would be an exercise in VBA manipulations of the data.
Excel does allow the referencing the Microsoft VBScrip Regular Expressions 5.5 and a the regular expression #\d+;? should find the different values.

Excel Forms Edit Only

I have this excel sheets + a vba part with 3 forms that interacts with the sheets (read/write data, xml export, etc).
I have some data verification in my forms' code, so I would like to be able to modify values in the sheet only through the forms, not through direct "on-the-sheet" editing
Is that possible?
When I lock the cells I want to protect, the forms cant modify the cells anymore either...
in other words, is there a way to prevent editing, except through the macros/forms?
I am using excel2007 and might have to make it compatible for excel2003.
Maybe you can unlock the cells from the code just before modifying them, and then lock them down again after? Not very elegant I know. Maybe you could also hide the sheet from the user. I'm sure there is no perfect protection, because ultimately the user can turn VBA/Macros off. Question is how much you want to protect the data.
Is Microsoft Office Infopath available to you and your users as an alternative to Excel?
This is very specifically a "forms" application, with data validation and native XML data storage format so other apps can easily process them. You can use your own schema if you want. From your description, this sounds like what you want to accomplish.
Unfortunately, Infopath 2007 forms are not cross-compatible with Infopath 2003, so a mixed-version office (like mine) can be a showstopper.

Resources