Updating Access DB form linked excel file - excel-2010

I have an Access DB which is linked to an Excel file. The excel file is linked to a SharePoint List. Whenever a change is made in the SharePoint List, the Excel file reflects the change and this change is also reflected in the Access DB. However, when I open the Excel in Read Only mode, the changes from the SharePoint List are reflected in Excel, but not in Access DB. Is there a way to overcome this (update Access linked table when Excel is opened in Read Only)?
Tried changing IMEX to 0 and 1, but didn't work.

Related

How to allow users to Upload local file, Edit in sheets, and Write back to local file

I'm investigating if it's possible for a user to: Pick a file on disk, automatically upload it to Google Sheets, do some edits, and write the changes back to the file.
I basically want to use Google Sheets as the Editor of the local file.
Has anyone tried something like this, or can confirm if it's a feasible idea?
My rough idea:
Install a script or program, that a user (on our team) can execute with the appropriate file they pick.
Typically they right-click a file and pick "Open with MyGoogleSheetsCreate".
The ToSheets-script does the following:
Generates a temporary Spreadsheet on the user's Google Drive (or possibly a Team Drive/Folder for temp files)
Reads the custom data in the local file and enters it into the Spreadsheet.
Opens a Browser window with the generated spreadsheet.
The user makes some changes to the spreadsheet.
The user exports the changes back to the file.
User initiates this how? Some ideas:
Perferably: I build a button or menu option to "Export back to Local Disk". This would only be viable if we could explicitly say where to save this custom file, i.e. where it came from.
Optionally: They right-click the original file and pick "Open with MyGoogleSheetsRetrieve". The importer would need to know the address of the Google Sheet the local file was last exported to.
FromSheets-Script converts the Spreadsheet into our custom data format and overwrites the old file.
Bonus: The temporary Google Sheet would be automatically moved to the Bin within a couple of days (without user interaction).
I think I've got a good idea of how to convert our custom format to Sheets and vice versa. The steps I'm most unsure of are: 3.1 and 5.1

Microsoft Graph API SharePoint Files Search

I try to search for files on SharePoint Document Library (e.g. the default 'root'). I created a few test-files by uploading them or create new Office files online and made some search-requests, e.g. https://graph.microsoft.com/v1.0/sites/root/drive/root/search(q='{query}') and until yesterday everything worked fine.
Now I started to edit files on SharePoint or created/uploaded new ones and with this edited or new files, I have the problem that I get no result when I search for them. "old" files, I created when I started I find although, as long as I don't edit them.
To get access I registered an App inside the AAD and gave it the needed permissions (
Sites.Read.All, Sites.ReadWrite.All, Files.Read.All, Files.ReadWrite.All
and a direct access to a specific file with https://graph.microsoft.com/v1.0/sites/root/drive/items/{item-id}/ works also well.
Search will read data from indexed data, but crawling and re-indexing of a library need to take some time. So you the code return null for the new files:
https://graph.microsoft.com/v1.0/sites/root/drive/root/search(q='{query}')
The following code get the library data directly but not based on the indexed data, so it works well.
https://graph.microsoft.com/v1.0/sites/root/drive/items/{item-id}/

Update to OneDrive DriveItem FileSystemInfo facet

I am trying to update the FileSystemInfo facet for a DriveItem object in OneDrive but I am running into some unexpected issues.
Some background first:
This task is part of Box to OneDrive migration. The users are using a tool for the migration and have noticed once migrated to OneDrive and synced back to their systems the 'created' and 'modified' dates are updated to the date the file was uploaded to OneDrive.
This messes up some of the file management tools they use (multiple files ...same names and now same timestamps) and makes file management difficult.
So we have been asked to update the files with the correct created and modified dates.
From Box developer documentation I see that it has fields to save timestamps for file creation and modify on the client (https://developer.box.com/docs/content-times - specifically the fields content_created_at and content_modified_at).
So the current plan is to use Box API to get the content_created_at and content_modified_at timestamps and then update the filesysteminfo facet of the corresponding file in OneDrive (still trying to workout how to locate that particular file).
End of BackGround Info
On trying this out in the Graph developer I can see that filesysteminfo facet createdDateTime and lastModifiedDateTime are updated as expected. However there are two issues:
The file in my development system does not show an updated Created and modified date (this works fine if I try to update the filename).
I can see that the OneDrive createdDateTime and lastModifiedDateTime also get updated (the ones outside the filesysteminfo facet). This I did not expect.
Could someone guide me on how to get this working and more imp if my understanding is correct
Thanks for all the help

Does Sharepoint not store column data in Office documents as custom properties?

(I develop in Delphi XE7, edit documents locally in Office 2010 and use SharePoint through a corporate Office365 account.)
I have developed a Delphi program that modifies Word 2010 document properties and even filters and orders them by their properties. The folder where the document was stored is a network folder. The only problem is that this is slow for some colleagues in countries other than the folder location.
I thought that by moving the relevant folder to a Sharepoint server and syncing it with a local folder through OneDrive, I could overcome that issue. Also users could choose between the two interfaces, the Web Browser having access to the Sharepoint server or the Delphi program working on the local folder, changes done in one location being synched by OneDrive with the other location.
I made columns in the Sharepoint library matching the Word properties and initially Sharepoint recognized all properties and made nice lists with them.
The problem is that subsequent changes of the properties are not transferred from one place to another.
If the change is done through the Delphi program in local PC, I have overcome the issue by cheating Sharepoint: instead of simply saving a document, the Delphi program copies and pastes the contents into a new document, where the properties are saved and automatically transferred into Sharepoint columns.
But I have not found a workaround when the change of properties is done through Sharepoint…
Apparently, Sharepoint does not store the column data in the document itself, as custom properties. In fact, after downloading the document it still shows as properties the former values, not the ones showing up in Sharepoint.
Should I give up with my intention of changing properties either locally or through Sharepoint?
It turned out that the Server properties are actually stored in the Office document itself but in a different location. Physically, each type of properties is stored in different files of those that are compressed in a .docx file: custom properties come in the file "docProps/custom.xml", whereas server properties come in "customXml/item3.xml", being referred to with an "internal name" that fills the spaces between words. But anyhow, as noted in some threads here, programmatically server/SharePoint properties can be modified and retrieved through VBA with the collection ContentTypeProperties.

How to open MS Excel Workbook 2010 in ToleContainer using delphi 6

I am using TOleContainer to Access Excel from Application. in Olecontainer objects we have MS Excel 2003 worksheet, but I need to open Excel Workbook 2010 version. Can any one help me.
Thanks.
Use TOleContainer.CreateObjectFromFile. From the documentation (link to current documentation, but TOleContainer hasn't changed in ages so it's relevant to the version of Delphi you're using):
Creates an embedded OLE object from the contents of a file.
Call CreateObjectFromFile to create an OLE object from the file specified by the FileName parameter. The Iconic parameter indicates whether the object is shown as an icon (true) or displayed as it would be in the server application (false). If there's already an OLE object in the container, it is destroyed and any changes the user made to it are discarded.
A sample of use would be:
OleContainer1.CreateObjectFromFile('C:\temp\test.xlsx', False);
You can also use TOleContainer.CreateObject, if you know the class name of the OLE class. You can find that by using CreateObjectFromFile as I've shown to load an existing Excel file and the reading the TOleContainer.OleClassName. (This is also available in the documentation.) An example using the same version of Excel I have for the above:
OleContainer1.CreateObject('Excel.Sheet.12', False);

Resources