β β β ο½ππ»βΊπ«Δπ¬πβ β β β
π¦ PHP4 COM function (windows version) : FULL
PART 4
twitter.com/UNDERCODETC
π¦ ππΌππ πππΈβπ :
"; #Open workbook
so that we can use it
$ wkb = $ ex-> application-> Workbooks-> Open ($ workbook) or Die (" Did not open " );
# Pre-save the original workbook, create a copy of the workbook
$ ex-> Application->
# $ ex-> Application-> Visible = 1; #This sentence goes to comment to make Excel visible
# Read and write a cell in a new worksheet
# We can read this cell E11 (Advertising in the 4th. Quarter)
$ sheets = $ wkb-> Worksheets ($ sheet); #Select the sheet
$ sheets-> activate; #Activate it
$ cell = $ sheets-> Cells (11,5); #Select the cell (Row Column number)
$ cell-> activate; #Activate the cell
print "Old Value = {$ cell-> value}
"; #Print the value of the cell: 10000
$ cell-> value = 15000; #Change it to 15000
print "New value = {$ cell-> value}
"; #Print the new value = 15000 #Finally
, recalculate this cell with the new value
$ sheets-> Calculate; #Required
if you want to calculate, manual is optional
# Can see Total effect value (cell E13)
$ cell = $ sheets-> Cells (13,5); #Select the cell (Row Column number)
$ number = Number_format ($ cell-> value);
print "New Total cost = $$ number-was $ 47,732 before.
" ;
#According to the calculation formula, the advertisement affects the company's expenses, here will display $ 57,809 #using the
Excel built-in function
# PMT (percent / 12 months, Number of payments, Loan amount)
$ pay = $ ex-> application-> pmt (0.08 / 12,10,10000);
$ pay = sprintf ("%. 2f", $ pay);
print "Monthly payment for $ 10,000 loan @ 8% interest / 10 months: $ $ pay
";
#Should print monthly payment = $ -1,037.03 #Optional
, save
$ ex-> Application-> ActiveWorkbook-> SaveAs ("Ourtest"); #Close
without asking
$ ex-> application-> ActiveWorkbook-> Close ("False");
unset ($ ex);
?>
Written by UndercOde
β β β ο½ππ»βΊπ«Δπ¬πβ β β β
π¦ PHP4 COM function (windows version) : FULL
PART 4
twitter.com/UNDERCODETC
π¦ ππΌππ πππΈβπ :
"; #Open workbook
so that we can use it
$ wkb = $ ex-> application-> Workbooks-> Open ($ workbook) or Die (" Did not open " );
# Pre-save the original workbook, create a copy of the workbook
$ ex-> Application->
# $ ex-> Application-> Visible = 1; #This sentence goes to comment to make Excel visible
# Read and write a cell in a new worksheet
# We can read this cell E11 (Advertising in the 4th. Quarter)
$ sheets = $ wkb-> Worksheets ($ sheet); #Select the sheet
$ sheets-> activate; #Activate it
$ cell = $ sheets-> Cells (11,5); #Select the cell (Row Column number)
$ cell-> activate; #Activate the cell
print "Old Value = {$ cell-> value}
"; #Print the value of the cell: 10000
$ cell-> value = 15000; #Change it to 15000
print "New value = {$ cell-> value}
"; #Print the new value = 15000 #Finally
, recalculate this cell with the new value
$ sheets-> Calculate; #Required
if you want to calculate, manual is optional
# Can see Total effect value (cell E13)
$ cell = $ sheets-> Cells (13,5); #Select the cell (Row Column number)
$ number = Number_format ($ cell-> value);
print "New Total cost = $$ number-was $ 47,732 before.
" ;
#According to the calculation formula, the advertisement affects the company's expenses, here will display $ 57,809 #using the
Excel built-in function
# PMT (percent / 12 months, Number of payments, Loan amount)
$ pay = $ ex-> application-> pmt (0.08 / 12,10,10000);
$ pay = sprintf ("%. 2f", $ pay);
print "Monthly payment for $ 10,000 loan @ 8% interest / 10 months: $ $ pay
";
#Should print monthly payment = $ -1,037.03 #Optional
, save
$ ex-> Application-> ActiveWorkbook-> SaveAs ("Ourtest"); #Close
without asking
$ ex-> application-> ActiveWorkbook-> Close ("False");
unset ($ ex);
?>
Written by UndercOde
β β β ο½ππ»βΊπ«Δπ¬πβ β β β
β β β ο½ππ»βΊπ«Δπ¬πβ β β β
π¦ shell-Can you use Shell to query, modify, delete, etc. SQL?
pinterest.com/UnderCodeOfficial
π¦ ππΌππ πππΈβπ :
#! / Usr / bin / ksh
SQL_EXEC ()
{
sqlplus the USER $ / $ @ $ DB the PASSWD <<!
SET LINESIZE 1024
SET pageSize 1024
$ SQLCOMM
quit
!
}
#select
SQLCOMM = "SELECT 'XXX', username from the all_users;"
SQL_EXEC | grep XXX
#insert, Delete omitted
with INformIX yo prompts what to do if sql_exec cannot be found.
I think this should work,
#vi query.sh
sqlplus $ USER / $ PASSWD << EOF
select β¦β¦ from β¦β¦β¦β¦
insert β¦β¦β¦β¦β¦β¦
delete β¦β¦β¦β¦β¦β¦
EOF
: wq
# query.sh
isql <<!
database dbname;
select * from tbname where fieldname="xxxxx";
delete from tbname;
.....
close database;
!
Written by Underc0de
β β β ο½ππ»βΊπ«Δπ¬πβ β β β
π¦ shell-Can you use Shell to query, modify, delete, etc. SQL?
pinterest.com/UnderCodeOfficial
π¦ ππΌππ πππΈβπ :
#! / Usr / bin / ksh
SQL_EXEC ()
{
sqlplus the USER $ / $ @ $ DB the PASSWD <<!
SET LINESIZE 1024
SET pageSize 1024
$ SQLCOMM
quit
!
}
#select
SQLCOMM = "SELECT 'XXX', username from the all_users;"
SQL_EXEC | grep XXX
#insert, Delete omitted
with INformIX yo prompts what to do if sql_exec cannot be found.
I think this should work,
#vi query.sh
sqlplus $ USER / $ PASSWD << EOF
select β¦β¦ from β¦β¦β¦β¦
insert β¦β¦β¦β¦β¦β¦
delete β¦β¦β¦β¦β¦β¦
EOF
: wq
# query.sh
isql <<!
database dbname;
select * from tbname where fieldname="xxxxx";
delete from tbname;
.....
close database;
!
Written by Underc0de
β β β ο½ππ»βΊπ«Δπ¬πβ β β β
Pinterest
UndercOde (UNDERCODEOFFICIAL) on Pinterest
UndercOde | πππππ£βπ ππ πππ€π₯πππ βπ ππ‘πππͺ:
Programming, Web & Applications makers, Host, bugs fix, Satellite Reicivers Programming..
Started Since 2011
Programming, Web & Applications makers, Host, bugs fix, Satellite Reicivers Programming..
Started Since 2011
β β β ο½ππ»βΊπ«Δπ¬πβ β β β
π¦ shell-Can SHELL be used to query, modify, delete, etc. SQL
! # / Usr / bin / ksh
SQL_EXEC ()
{
sqlplus the USER $ / $ @ $ DB the PASSWD <<!
SET LINESIZE 1024
SET pageSize 1024
$ SQLCOMM
quit
!
}
#select
SQLCOMM = "SELECT 'XXX', username from the all_users;"
SQL_EXEC | grep XXX
#insert, Delete omitted
with What should I do if I cannot find sql_exec in INformIX?
I think this should work,
#vi query.sh
sqlplus $ USER / $ PASSWD << EOF
select β¦β¦ from β¦β¦β¦β¦
insert β¦β¦β¦β¦β¦β¦
delete β¦β¦β¦β¦β¦β¦
EOF
: wq
# query.sh
isql <<!
database dbname;
select * from tbname where fieldname="xxxxx";
delete from tbname;
.....
close database;
!
written by undercode
β β β ο½ππ»βΊπ«Δπ¬πβ β β β
π¦ shell-Can SHELL be used to query, modify, delete, etc. SQL
! # / Usr / bin / ksh
SQL_EXEC ()
{
sqlplus the USER $ / $ @ $ DB the PASSWD <<!
SET LINESIZE 1024
SET pageSize 1024
$ SQLCOMM
quit
!
}
#select
SQLCOMM = "SELECT 'XXX', username from the all_users;"
SQL_EXEC | grep XXX
#insert, Delete omitted
with What should I do if I cannot find sql_exec in INformIX?
I think this should work,
#vi query.sh
sqlplus $ USER / $ PASSWD << EOF
select β¦β¦ from β¦β¦β¦β¦
insert β¦β¦β¦β¦β¦β¦
delete β¦β¦β¦β¦β¦β¦
EOF
: wq
# query.sh
isql <<!
database dbname;
select * from tbname where fieldname="xxxxx";
delete from tbname;
.....
close database;
!
written by undercode
β β β ο½ππ»βΊπ«Δπ¬πβ β β β