Post Reply 
Spreadsheet app insert column
06-26-2017, 10:45 PM
Post: #7
RE: Spreadsheet app insert column
You can use the programs below to insert and delete columns:

PHP Code:
EXPORT InsertCol(c)
BEGIN
 local rs
,cs;
 
rs:=SIZE(A:A);
 
cs:=SIZE(1:1);
 FOR 
I FROM c TO cs DO
  FOR 
J FROM 1 TO rs DO
   
Cell(J,cs-I+c+1,−1):=Cell(J,cs-I+c,−1);
  
END;
 
END;
 FOR 
J FROM 1 TO rs DO
  
Cell(J,c,−1):=Cell(J,cs+1,−1);
 
END;
 
"all done";
END;

EXPORT DeleteCol(c)
BEGIN
 local rs
,cs;
 
rs:=SIZE(A:A);
 
cs:=SIZE(1:1);
 FOR 
I FROM c TO cs DO
  FOR 
J FROM 1 TO rs DO
   
Cell(J,I,−1):=Cell(J,I+1,−1);
  
END;
 
END;
 
"all done";
END

Example: If you want to insert a column at B just go to the home or cas view and type InsertCol(2). Similar for DeleteCol.

I'm working on a similar method to insert and delete rows.

Eventually, as time permits, I plan to use the Curser variable to locate where to insert or delete, and hijack the plot key to display a pop up menu asking how many rows or columns.

-road
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Spreadsheet app insert column - KeithB - 06-18-2017, 04:12 PM
RE: Spreadsheet app insert column - Arno K - 06-18-2017, 07:20 PM
RE: Spreadsheet app insert column - KeithB - 06-19-2017, 12:09 AM
RE: Spreadsheet app insert column - KeithB - 06-22-2017, 10:25 PM
RE: Spreadsheet app insert column - roadrunner - 06-26-2017 10:45 PM



User(s) browsing this thread: 1 Guest(s)