- Notifications
You must be signed in to change notification settings - Fork1.9k
Supports setting cell comment properties#1159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Siemienik commentedMar 31, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@Alanscut, many changes are here, should we make a review session through zoom.us? |
Alanscut commentedApr 7, 2020
@Siemienik Sorry for replying so late. I am looking forward to video communication with you, but English is not my native language, video communication will be very difficult for me. I would rather explain my purpose and plan in writing, hope you not mind. Purpose:excel.js currently only supports inserting annotations, but does not allow users to set the corresponding properties of annotations. This PR is to solve this problem. Code:This PR will support setting protection, margin and object position attributes. I also want to support font, alignment, size and color and line attributes, so that users can insert comments flexibly.
This PR is a new feature and will not affect the original function, and all test cases are successful. DemoconstExcel=require('../../lib/exceljs.nodejs');constworkbook=newExcel.Workbook();constws2=workbook.addWorksheet('sheet1');ws2.getCell('A1').value='Hello';ws2.getCell('A1').note='Hello, ExcelJS!';ws2.getCell('A5').value='world';ws2.getCell('A5').note={texts:[{'font':{'size':12,'color':{'theme':0,},'name':'Calibri','family':2,'scheme':'minor',},'text':'hello exceljs',}],margins:{insetmode:'custom',inset:[0.55,0.55,0.45,0.45],},protection:{locked:'True',lockText:'True',},editAs:'absolute',};constfileName1='./read/issue_comments_padding.xlsx';workbook.xlsx.writeFile(fileName1).then(()=>{console.log('ok');}); XML// vmlDrawing1.vml<v:shapeid="_x0000_s1026"type="#_x0000_t202"style="position:absolute; margin-left:105.3pt;margin-top:10.5pt;width:97.8pt;height:59.1pt;z-index:1;visibility:hidden"fillcolor="infoBackground [80]"strokecolor="none [81]"o:insetmode="custom"> <v:fillcolor2="infoBackground [80]" /> <v:shadowcolor="none [81]"obscured="t" /> <v:patho:connecttype="none" /> <v:textboxstyle="mso-direction-alt:auto"inset="5.5mm,5.5mm,4.5mm,4.5mm"> <divstyle="text-align:left" /> </v:textbox> <x:ClientDataObjectType="Note"> <x:MoveWithCells /> <x:SizeWithCells /> <x:Anchor>1, 6, 3, 14, 3, 2, 7, 16</x:Anchor> <x:Locked>True</x:Locked> <x:AutoFill>False</x:AutoFill> <x:LockText>True</x:LockText> <x:Row>4</x:Row> <x:Column>0</x:Column> </x:ClientData> </v:shape> |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Siemienik left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Thank you@Alanscut. I've just reviewed it deeply and have only one comment here:)
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
alubbe commentedMay 20, 2020
@Siemienik what do you think? |
changes