Below are code snippets of what I currently use to import and export Excel files. However, is it possible to make this work through an Azure Web App which is serverless?
C#
File.WriteAllBytes(@"c:tempreport.xlsx", excel.GetAsByteArray());
SQL Server
INSERT INTO Employee (FirstName, Salary)
SELECT FirstName, Salary
FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0',
'Excel 12.0; Database=C:TempData.xlsx', [Sheet1$]);
2
Answers
Approach 1:
This could be achieved using azure logics apps along with web apps.
Approach 2:
Another way to achieve this is by coding data extract and upload logic at db end in a stored procedure. However, your db should be either on-prem or on IAAS ( VM based ) to be able to use xp_cmdshell utility from stored procedure.
Another approach is to map a network drive to an Azure file share. See here: https://techcommunity.microsoft.com/t5/fasttrack-for-azure/mapping-a-network-drive-to-an-azure-file-share-using-domain/ba-p/2220773