如何使用Apache POI添加上标文本(How to add superscript text using Apache POI)

我想在Excel单元格中显示一些带有上标的文本。 我试图将HTML字符串传递给XSSFRichTextString,但它显示输出文件中的HTML字符串。

我正在使用Apache POI 3.16

屏幕截图来解释要求


I want to display some text with superscript into Excel cell. I tried to pass the HTML string to XSSFRichTextString but it displays the HTML string as it is in the output file.

I'm using Apache POI 3.16

Screenshot to explain the requirement


原文:https://stackoverflow.com/questions/44371695
2023-08-09 11:08

满意答案

select c.*,
    (
        select count(1)
        from customer_inventory_tbl
        where spex = c.spex
        ) "count"
from customer_inventory_tbl c;

select c.*,
    (
        select count(1)
        from customer_inventory_tbl
        where spex = c.spex
        ) "count"
from customer_inventory_tbl c;

相关问答

更多

使用Django查询降低在SQL数据库中搜索的成本(Reducing cost for searching in a SQL Database using Django query)

根据你的需要,我认为你可以简单地这样做: get_req = request.GET.get('drugid', '') # Fetching all the epc_ids that belongs to requisted drug_bank_ids comp_class = DrugBankDrugEPClass.objects.filter(drug_bank_id = get_req).values_list('epc_id', flat=True).distinct() # filte...

搜索我的SQL数据库不工作,它正在带回所有的结果(Searching my sql database is not working, it is bringing back all of the results)

你必须替换这行代码: $sql = "SELECT client_id, domain, comment FROM FirstAttempt WHERE client_id = '78' OR domain = 'sausage'"; 这样: $client_id = $conn->real_escape_string($_POST['client_id']); $domain = $conn->real_escape_string($_POST['domain']); $sql ...

使用SQL搜索DB2进行分页的最快/最有效的方法(Fastest most/efficient way to do pagination with SQL searching DB2)

如果您尝试显示结果的总计数以及分页计数(因此38中的0到25),单独的声明可能是您最好的选择。 我已经尝试了很多东西来计算各行的数量,但性能(即使在温和的测试数据库上)也很糟糕。 你可能应该做的是创建一个你可以查询的视图,其中包含你所有的选择标准,然后用必要的行为包装它: 计数: SELECT COUNT(*) FROM view 排名行: SELECT * FROM (SELECT *, ROW_NUMBER() OVER(ORDER BY item) as RANK FROM v...

在SQL Server上备份db的权限?(Permission to backup db on SQL Server?)

BACKUP DATABASE和BACKUP LOG权限默认授予sysadmin固定服务器角色和db_owner和db_backupoperator固定数据库角色的成员。 来自http://msdn.microsoft.com/en-us/library/ms186865.aspx BACKUP DATABASE and BACKUP LOG permissions default to members of the sysadmin fixed server role and the db_ow...

搜索特定的SQL表,然后在此结果中搜索行(Searching for specific SQL table, then searching for row in this outcome)

实际上引发了错误,因为你没有像在第8行那样获取第6行上的查询值。无论如何,你试图只做: $date_select = "SELECT * FROM $cscomp WHERE shipdate = CURRDATE() AND csship='$csship' LIMIT=1"; 我没有看到第一个查询的含义是什么。 您要求mysql为您提供表名,要求根据表名过滤db。 Actually the error is thrown because you don...

SQL LIKE%NOT SEARCHING(SQL LIKE % NOT SEARCHING)

使用 LIKE '%' + @search + '%' 代替 LIKE '%@search%' 完整查询; ... else { sql = "SELECT a.cname,[bid],b.[bname],b.[baddress],b.[bcity],b.[bstate],b.[bpostcode],b.[bphone],b.[bfax],b.[bemail] FROM [CLIENT] a INNER JOIN [BRANCH] b ON a.clientID=b.clientID ...

功能不搜索特定的单词(Function not searching for a specific word)

默认情况下,mysql全文搜索将超过50%的词或行作为停用词( http://dev.mysql.com/doc/refman/5.1/en/fulltext-natural-language.html )。 尝试以布尔模式( http://dev.mysql.com/doc/refman/5.1/en/fulltext-boolean.html )进行搜索,其中没有50%的阈值。 By default, mysql fulltext search treats a word that occur...

在搜索特定SQL时计算整个数据库(Counting whole DB while searching for specific SQL)

select c.*, ( select count(1) from customer_inventory_tbl where spex = c.spex ) "count" from customer_inventory_tbl c; select c.*, ( select count(1) from customer_inventory_tbl where spe...

SQL LIKE不搜索(SQL LIKE not searching)

不要在LIKE语句中添加% ,而是在PHP代码中执行。 当您使用带引号的绑定参数时,很可能您的数据库框架变得混乱。 $find = $this->query("SELECT id FROM titles WHERE skuid LIKE :cusa"); $find->execute(array(":cusa" => '%' . $cusa . '%')); Don't add the % in the LIKE statement, instead do it in the PHP code....

使用UNION组合相同的SQL表并搜索特定的单词返回重复的行(Using UNION to combine same SQL Tables and searching for a specific word return duplicate rows)

这是解决方案的SQLite部分,请自己包装成java: SELECT * FROM ( SELECT * FROM _12603 UNION ALL SELECT * FROM _25912 UNION ALL SELECT * FROM _44057 UNION ALL SELECT * FROM _76468 ) WHERE REPLACE(path, rtrim(path, replace(path, '\', '')), '') -- only filename ...

相关文章

更多

Apache POI的使用

              Apache POI Apache POI是Apache软件基金会的开放源 ...

Apache POI开发环境配置

我们假设本教程的读者安装的是Java SDK版本1.7.0_60安装在他们的系统中

使用POI操作Excel和Word

前言:今天在项目中看到有小模块是上传Excel解释后保存到数据库的操作,好奇之下去了解了如何使用Apa ...

POI核心API

setCellValue(boolean value)设置单元格一个布尔值

POI Fonts 字体样式处理

java.io.FileOutputStream

POI 操作Excel公式

在执行这个公式

POI设置打印区域

org.apache.poi.xssf.usermodel.XSSFWorkbook

POI给单元格数据添加超链接

cell.setHyperlink(link)

POI 操作 Excel的主要API

Java Aspose Cells 是一种纯粹的Java授权的Excel API

apache solr之我们的应用

一.安装准备: #下载 JDK wget http://download.oracle.com/otn ...

最新问答

更多

获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)

我用Google搜索了一个解决方案。 “EnumDisplayModeProvider”是我自己设置网站的各种模式的枚举。 public EnumDisplayModeProvider GetDisplayModeId() { foreach (var mode in DisplayModeProvider.Instance.Modes) if (mode.CanHandleContext(HttpContext)) {

如何通过引用返回对象?(How is returning an object by reference possible?)

这相对简单:在类的构造函数中,您可以分配内存,例如使用new 。 如果你制作一个对象的副本,你不是每次都分配新的内存,而是只复制指向原始内存块的指针,同时递增一个也存储在内存中的引用计数器,使得每个副本都是对象可以访问它。 如果引用计数降至零,则销毁对象将减少引用计数并仅释放分配的内存。 您只需要一个自定义复制构造函数和赋值运算符。 这基本上是共享指针的工作方式。 This is relatively easy: In the class' constructor, you allocate m

矩阵如何存储在内存中?(How are matrices stored in memory?)

正如它在“熵编码”中所说的那样,使用Z字形图案,与RLE一起使用,在许多情况下,RLE已经减小了尺寸。 但是,据我所知,DCT本身并没有给出稀疏矩阵。 但它通常会增强矩阵的熵。 这是compressen变得有损的点:输入矩阵用DCT传输,然后量化量化然后使用霍夫曼编码。 As it says in "Entropy coding" a zig-zag pattern is used, together with RLE which will already reduce size for man

每个请求的Java新会话?(Java New Session For Each Request?)

你是如何进行重定向的? 您是否事先调用了HttpServletResponse.encodeRedirectURL()? 在这里阅读javadoc 您可以使用它像response.sendRedirect(response.encodeRedirectURL(path)); The issue was with the path in the JSESSIONID cookie. I still can't figure out why it was being set to the tomca

css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)

我认为word-break ,如果你想在一个单词中打破行,你可以指定它,这样做可以解决问题: .column { word-break:break-all; } jsFiddle演示。 您可以在此处阅读有关word-break属性的更多信息。 I think word-break, with which you can specify if you want to break line within a word, will do the trick: .column { word-break

无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)

我认为您忘记在分类时间内缩放输入图像,如train_test.prototxt文件的第11行所示。 您可能应该在C ++代码中的某个位置乘以该因子,或者使用Caffe图层来缩放输入(请查看ELTWISE或POWER图层)。 编辑: 在评论中进行了一次对话之后,结果发现在classification.cpp文件中错误地删除了图像均值,而在原始训练/测试管道中没有减去图像均值。 I think you have forgotten to scale the input image during cl

xcode语法颜色编码解释?(xcode syntax color coding explained?)

转到: Xcode => Preferences => Fonts & Colors 您将看到每个语法高亮颜色旁边都有一个简短的解释。 Go to: Xcode => Preferences => Fonts & Colors You'll see that each syntax highlighting colour has a brief explanation next to it.

在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)

你考虑过第三方拼写检查吗? 您可以将在C#中开发的自定义WinForms控件插入访问数据库吗? VB6控件怎么样? 如果你能找到一个使用第三方库进行拼写检查的控件,那可能会有效。 Have you considered a third party spell checker? Can you insert a custom WinForms controls developed in C# into an access database? What about a VB6 control? If

从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)

我有同样的问题,因为我在远程服务器上有两个图像,我需要在每天的预定义时间复制到我的本地服务器,这是我能够提出的代码... try { if(@copy('url/to/source/image.ext', 'local/absolute/path/on/server/' . date("d-m-Y") . ".gif")) { } else { $errors = error_get_last(); throw new Exception($err

从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))

我不确定我完全明白你在说什么。 你能编辑你的帖子并包含你正在做的Subversion命令/操作的特定顺序吗? 最好使用命令行svn客户端,以便容易为其他人重现问题。 如果您只是想获取文件的旧副本(即使该文件不再存在),您可以使用如下命令: svn copy ${repo}/trunk/moduleA/file1@${rev} ${repo}/trunk/moduleB/file1 其中${repo}是您的存储库的URL, ${rev}是您想要的文件的版本。 这将恢复该文件的旧版本,包括最高版本