Posts

Sudden Increases in Workbook File Size

Image
Excel files seem to just get bigger and bigger often balooning in size at the blink of an eye, but how do you find out where all the extra file size is coming from ? There is a way to separate out each object in your file, and examine it's contribution to the overall file size ..and here is where all the file size is coming from: - in this case, the culprit is clearly Sheet2, so that's where to start looking.. Here's how to do it: Save your file SaveAs a completely new name so that you can mess about with it SaveAs Web page (choose 'Other Formats' in Excel 2007) Open Explorer Navigate to where you saved the file Open the folder with the same name as your file Sort descending by the file size The largest ojects will be named, and at the top now go to that sheet and verify for format or data issue.

roslyn in MVC

Image
If you're using VS 2015 for development, ASP.NET projects now use Roslyn by default. The host I use as a test server doesn't support Roslyn / C# 6.0 yet. Though the website gets published successfully (using Web Deploy), I end up with an Internal Server Error. According to this, roslyn support is added using a nuget package. So the first thing to do, is to remove the package. Open the Package Manager Console and type the following one line at a time:   Run the below step by step uninstall-package Microsoft.CodeDom.Providers.DotNetCompilerPlatform uninstall-package Microsoft.Net.Compilers    Now Remove this from Webconfig    <system.codedom> < compilers > < compiler language = " c#;cs;csharp " extension = " .cs " type = " Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version = 1.0.0.0, Culture = neutral, PublicKeyToken = 31bf3856ad364...

Copy multiple excel sheets to one

First add a sheet and rename the label to "MASTER" than run the below macro. Sub CopyDataToMaster() Sheets("Master").Activate For a = 2 To Sheets.Count         Sheets(a).Select     Rows("4:4").Select      Range(Selection, Selection.End(xlDown)).Select     Application.CutCopyMode = False     Selection.Copy     Sheets("Master").Select           R = Sheets("Master").Range("A65536").End(xlUp).Row + 1         Sheets("Master").Cells(R, 1).Select         ActiveSheet.Paste Next MsgBox "Done" End Sub

Sort Alpha Numeric data in SQL Server

Image
Sorting a alphanumeric data, A sample data is as below When i sort the data it looks like below I have modified the ORDER BY clause as shown below, and it returned the results in the proper order. (Note: The ID column is defined as varchar(20). So, I did the following to fix this issue: If ID is numeric, add 21 '0's in front of the ID value and get the last 20 characters If ID is not numeric, add 21 ‘’s at the end of the ID value and get the first 20 characters

SP_helptext issue has been resolved.

SP_helptext issue has been resolved . CREATE PROCEDURE [dbo].[sp_helptext2] (@ProcName NVARCHAR(256)) AS BEGIN   DECLARE @PROC_TABLE TABLE (X1  NVARCHAR(MAX))   DECLARE @Proc NVARCHAR(MAX)   DECLARE @Procedure NVARCHAR(MAX)   DECLARE @ProcLines TABLE (PLID INT IDENTITY(1,1), Line NVARCHAR(MAX))   SELECT @Procedure = 'SELECT DEFINITION FROM '+db_name()+'.SYS.SQL_MODULES WHERE OBJECT_ID = OBJECT_ID('''+@ProcName+''')'   insert into @PROC_TABLE (X1)         exec  (@Procedure)   SELECT @Proc=X1 from @PROC_TABLE   WHILE CHARINDEX(CHAR(13)+CHAR(10),@Proc) > 0   BEGIN         INSERT @ProcLines         SELECT LEFT(@Proc,CHARINDEX(CHAR(13)+CHAR(10),@Proc)-1)         SELECT @Proc = SUBSTRING(@Proc,CHARINDEX(CHAR(13)+CHAR(10),@Proc)+2,LEN(@Proc))   END  --* inserts last line  insert @ProcLines  select @Proc ;  --edited here. (whe...

System.IO.IsolatedStorage.IsolatedStorageException: Unable to create the store directory

Error Supporting Info System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.IO.IsolatedStorage.IsolatedStorageException: Unable to create the store directory. (Exception from HRESULT: 0x80131468) at System.IO.IsolatedStorage.IsolatedStorageFile.GetRootDir(IsolatedStorageScope scope, StringHandleOnStack retRootDir) at System.IO.IsolatedStorage.IsolatedStorageFile.InitGlobalsNonRoamingUser(IsolatedStorageScope scope) at System.IO.IsolatedStorage.IsolatedStorageFile.GetRootDir(IsolatedStorageScope scope) at System.IO.IsolatedStorage.IsolatedStorageFile.GetGlobalFileIOPerm(IsolatedStorageScope scope) at System.IO.IsolatedStorage.IsolatedStorageFile.Init(IsolatedStorageScope scope) at System.IO.IsolatedStorage.IsolatedStorageFile.GetStore(IsolatedStorageScope scope, Type domainEvidenceType, Type assemblyEvidenceType) at MS.Internal.IO.Packaging.PackagingUtilities.ReliableIsolatedStorageFileFolder.G...

HTTP Error 500.0 - Internal Server Error Calling LoadLibraryEx on ISAPI filter "C:\Windows\Microsoft.NET\Framework\v4.0.30319\\aspnet_filter.dll" failed

HTTP Error 500.0 - Internal Server Error Calling LoadLibraryEx on ISAPI filter "C:\Windows\Microsoft.NET\Framework\v4.0.30319\\aspnet_filter.dll" failed I got this error, before you do any above stuff, just try below 1. Click on your computer icon in IIS 2. On right side, you see ISAPI filters - Click 3. Pick up the Filter name ASP.Net_4.0_64bit  and its path MIGHT HAVE AN EXTRA \ IN THE PATH, SO UNABLE TO LOAD THIS DLL,  %windir%\Microsoft.NET\Framework64 \\ v4.0.30319\aspnet_filter.dll 4. restart IIS - should resolve the error.