Question : How to remove empty columns or rows

Hello.

I am building an application for excel processing (this has become challenge) and I need to remove empty columns and rows of spreadsheets in a given directory.  The problem is that I may not always know the full range of the empty columns or rows.  

is the following possible and how can I search through a given folder?   I am not sure where to include the directory for the loop. thank you very much.  

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
private void removeEmptyCols(Excel.Range deleteCols)
        {
            Excel._Application oXL;
            Excel._Workbook oWB = oXL.ActiveWorkbook;
            Excel._Worksheet oWS = oWB.ActiveSheet;
            Excel.Range oRng;                        

            if (deleteCols.Areas.Count < 1)

               return;

            for (int cCount = 1; cCount <10; cCount++) 
            {
                if (oWS.Columns.Value2 = "")
                {
                    oWS.Columns.Delete;
                }               
            }            
        }

Answer : How to remove empty columns or rows

you can set visibility through style

document.getElementById('idofelement').style.display("none"); //hide element
document.getElementById('idofelement').style.display(""); //display element

css display will make the element invisible and also hide it from the page so elements will shift as if the element you hid was gone from the page

document.getElementById('idofelement').style.visibility("hidden"); //hide element
document.getElementById('idofelement').style.visibility("visible"); //display element

css visibility will make the item invisible, but it will still hold it's place on the page

for example if you had 3 images, and you used css display property to hide the middle image, the third image would move to be next to the first image, as if there was no 2nd image there. If you used visibility to hide the middle image, then the middle image would disappear and it would look like there was an empty space the size of the middle picture between pictures 1 and 3
Random Solutions  
 
programming4us programming4us