Category: excel\
-
Import CSV using “Microsoft Access Database Engine 2010” to SQL Server
[SQL] sp_configure ‘Ad Hoc Distributed Queries’, 1 reconfigure with override SET NOCOUNT ON EXEC master..xp_cmdshell ‘del C:\Temp\Schema.ini’ EXEC master..xp_cmdshell ‘echo [Test.txt] > C:\Temp\Schema.ini’ EXEC master..xp_cmdshell ‘echo ColNameHeader=True >> C:\Temp\Schema.ini’ EXEC master..xp_cmdshell ‘echo Format=Delimited(^|) >> C:\Temp\Schema.ini’ EXEC master..xp_cmdshell ‘echo MaxScanRows=50 >> C:\Temp\Schema.ini’ EXEC master..xp_cmdshell ‘echo CharacterSet=OEM >> C:\Temp\Schema.ini’ EXEC master..xp_cmdshell ‘echo Col1=ID TEXT >> C:\Temp\Schema.ini’ EXEC…
-
How to fix CLSID {00024500-0000-0000-C000-000000000046} error when using excel component in background code?
We haveĀ a windows Service application which uses Excel Application Object. It used to work on some machines but not all, the error which I am getting is: Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005. After some struggling I found a solution and it works,…
-
How to display negative time in excel cell
While working with excel application I found that if we find difference between 2 times is negative then excel doesn’t display time, it shows “##########” instead of values. For positive difference we don’t have any issue. There are 2 ways to handle this, using 1904 date system and other using custom formula. To change the…