Create Excel using openxml with embed css - css

In my web application, i'm using openXML to create and export excel files.
but i'm using different theme. so i want to change my excels style sheets base on my themes.
as far as i know this is how you can set the foreground Color of a cell in open xml:
ForegroundColor foregroundColor1 = new ForegroundColor() { Rgb = "FFFF0000" };
but i don't want to hard code my color.
So here is my question: is there anyway to use embed css for colorize my excel content using openXml?
thank you all

Related

Style Plotly Express with CSS

I'm currently working on a DASH\Plotly app. I am using dash-bootstrap-components with a custom CSS file.
My current problem is, that my plots aren't styled from the CSS file. So they don't perfectly match with the rest of the theme. From what I found this functionality is not possible.
https://plotly.com/python/templates
Is there maybe a possibility to generate a custom plotly.io Template for the plots which is generated from the CSS file? So that the colors, fonts, fontsizes inside the plots match to the rest of the app.

How to preview and print in PDF a markdown file with a file-specific CSS stylesheet in VS Code?

Here is my use case:
I want to create a markdown document (my CV for instance) and create a style for it using a CSS file. Then I want to print the PDF of my file.
I have installed the Markdown PDF extension in VS Code and it does its job.
To have the extension and the preview to properly render the styling, I changed the settings in vscode setting.json for both extensions to use my CSS file and it works.
For the preview:
{
"markdown.styles": ["my-styles.css"]
}
For the PDF export:
{
"markdown-pdf.styles": ["~/Documents/Styles/my-styles.css"]
}
However, this stylesheet is applied to all my markdown files and what I would like is to embed the CSS file for this specific file. I want to have a CV style for my CVs, a report style for reports, etc.
Is this feasible?
Using workspace specific settings solves my issue.
It does not allow to use one CSS per markdown file, but it's good enough: I can put all my CVs in one folder with the CV CSS in the workspace settings and my reports in another workspace with another CSS stylesheet

Free Download of Datatable css

I would like to change the css feel of my datatable. I am currently using jquerydatatables.css and jquery-ui.css. Is there any free download of datatable css?
Did you try checking the datatables website?
https://datatables.net/manual/styling/theme-creator
They provide support for several themes.
This online style builder will let you customise the colouring of the DataTables stylesheet to fit in seamlessly with your web-site or app. Simply select the colours you want for your table using the options below, and click the Create stylesheet button. The page will then reload and show your customised table below, with the CSS available to copy and paste for your site.
Here is the correct link-
Data tables applying your own css for changing the css of datatables.
You can provide it your own theme.
Just select the colors and
styling.
It will generate a CSS for your applied styling.
You can copy
in your css file.
You are good to go.
Hope this helps...

How to apply CSS to created pdf file in ASP.NET

I have generated a pdf file using third party now I want apply my own style to the content in pdf.
Can I insert an External CSS File into a generate PDF.
I have tried many ways but all is not working.
Thanks,
You cannot style an already generated PDF with CSS. It is not made out of selectable elements and there is no way to link the CSS to the PDF.
You will have to do the styling before the PDF is created. It's like trying to add more sugar to an already baked cake, there is no way to do it.

Photoshop Custom Shape to SVG path string

Is there any way to get the SVG path string off a Photoshop custom shape or path? Or is there another way to get/construct similar data? I'm looking to do something similar to this:
http://raphaeljs.com/icons/
Update: in recent versions of Photoshop, there is a built-in option to export the image as SVG, which works well on paths and custom shapes. Just do:
File -> Export -> Export as... and select SVG in the file settings.
Original Answer:
Starting from Photoshop CC 14.2, you can create SVG files directly from Photoshop:
Create a file named generator.json with the content below in your user home folder.
Restart Photoshop and open your PSD file.
Activate the generator: File > Generate > Image Assets.
Rename your layer to <something>.svg.
The svg file will be created in the assets directory next to your PSD file.
Content for generator.json:
{
"generator-assets": {
"svg-enabled": true
}
}
Source: http://creativedroplets.com/generate-svg-with-photoshop-cc-beta/
Select and copy the path in Photoshop
Launch Adobe Illustrator
Create a new Document
Paste
Save as SVG
If you have Illustrator and have not created all the paths, however, it is probably easier to create them directly in Illustrator.
If you do not have Illustrator, you are probably better off using the free Inkscape SVG editor to draw your paths.
If you do already have the paths in Photoshop, and do not have Illustrator, the best I can think of is to turn on the Info palette in Photoshop select the path points one at a time and manually record the positions of the point itself as well as its handles, and from those manually create the path using absolute curveto commands, 'C' (for the points with handles) and absolute lineto commands, 'L' for those points that have no handles.
Another option is to save the file as EPS in photoshop making sure to have export vectors checked, and then loading that into illustrator and saving as SVG
All answers were good, but for me they were too much, there is an online tool provided by Adobe:
http://adobe.com/go/extract_tryitnow_en
All you have to do is upload /drag & drop/ your .psd file, choose the path layer and download as svg. And you can extract the svg path, d attribute in particular.
Then what I did is put the path into a g element, then scaled g and translated the path
For custom shapes, you may want to have a look at the recently released open-source script called Convert Custom Shapes File to SVG Set (for Photoshop CS3 or later), used to convert a custom shapes file (.csh) or a custom shapes preferences file (CustomShapes.psp) into a set of SVG files.

Resources