Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sdkjs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
sdkjs
Commits
57b4d7d9
Commit
57b4d7d9
authored
May 24, 2016
by
Alexander.Trofimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
Set sheet name, setFontColor, setFontSize, setFontName in builder
parent
5d105d50
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
0 deletions
+39
-0
cell/apiBuilder.js
cell/apiBuilder.js
+39
-0
No files found.
cell/apiBuilder.js
View file @
57b4d7d9
...
@@ -33,6 +33,15 @@
...
@@ -33,6 +33,15 @@
return
new
ApiWorksheet
(
this
.
wbModel
.
getWorksheet
(
this
.
wbModel
.
getActive
()));
return
new
ApiWorksheet
(
this
.
wbModel
.
getWorksheet
(
this
.
wbModel
.
getActive
()));
};
};
/**
* Set sheet name
* @memberof ApiWorksheet
* @param {string} name
*/
ApiWorksheet
.
prototype
.
setName
=
function
(
name
)
{
this
.
worksheet
.
setName
(
name
);
};
/**
/**
* Returns an object that represents the range
* Returns an object that represents the range
* @memberof ApiWorksheet
* @memberof ApiWorksheet
...
@@ -62,13 +71,43 @@
...
@@ -62,13 +71,43 @@
this
.
range
.
setValue
(
val
);
this
.
range
.
setValue
(
val
);
};
};
/**
* Set text color in the rgb format.
* @param {byte} r
* @param {byte} g
* @param {byte} b
*/
ApiRange
.
prototype
.
setFontColor
=
function
(
r
,
g
,
b
)
{
this
.
range
.
setFontcolor
(
new
AscCommonExcel
.
RgbColor
((
r
<<
16
)
+
(
g
<<
8
)
+
b
));
};
/**
* Set font size
* @param {number} size
*/
ApiRange
.
prototype
.
setFontSize
=
function
(
size
)
{
this
.
range
.
setFontsize
(
size
);
};
/**
* Set font name
* @param {number} name
*/
ApiRange
.
prototype
.
setFontName
=
function
(
name
)
{
this
.
range
.
setFontname
(
name
);
};
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Export
// Export
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Api
.
prototype
[
"
GetActiveSheet
"
]
=
Api
.
prototype
.
GetActiveSheet
;
Api
.
prototype
[
"
GetActiveSheet
"
]
=
Api
.
prototype
.
GetActiveSheet
;
ApiWorksheet
.
prototype
[
"
setName
"
]
=
ApiWorksheet
.
prototype
.
setName
;
ApiWorksheet
.
prototype
[
"
getRange
"
]
=
ApiWorksheet
.
prototype
.
getRange
;
ApiWorksheet
.
prototype
[
"
getRange
"
]
=
ApiWorksheet
.
prototype
.
getRange
;
ApiWorksheet
.
prototype
[
"
setColumnWidth
"
]
=
ApiWorksheet
.
prototype
.
setColumnWidth
;
ApiWorksheet
.
prototype
[
"
setColumnWidth
"
]
=
ApiWorksheet
.
prototype
.
setColumnWidth
;
ApiRange
.
prototype
[
"
setValue
"
]
=
ApiRange
.
prototype
.
setValue
;
ApiRange
.
prototype
[
"
setValue
"
]
=
ApiRange
.
prototype
.
setValue
;
ApiRange
.
prototype
[
"
setFontColor
"
]
=
ApiRange
.
prototype
.
setFontColor
;
ApiRange
.
prototype
[
"
setFontSize
"
]
=
ApiRange
.
prototype
.
setFontSize
;
ApiRange
.
prototype
[
"
setFontName
"
]
=
ApiRange
.
prototype
.
setFontName
;
}(
window
,
null
));
}(
window
,
null
));
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment