네이버 스마트 스토어 에서 송장번호 일괄 변경 엑셀을 만들기 위해 찾아봤습니다

DevExpress.XtraPrinting.XlsxExportOptions 의 새 변수를 선언하고 SheetName 에 입력하면 됩니다.

DevExpress.XtraPrinting.XlsxExportOptions xlsxOptions = new DevExpress.XtraPrinting.XlsxExportOptions();
xlsxOptions.SheetName = "발송처리";    // sheet 명

this.gridControl3.DataSource = dtExcel;
this.gridControl3.ExportToXlsx(this.saveFileDialog1.FileName, xlsxOptions);
Cursor.Current = currentCursor;

 

Devexpress GridControl 을 그대로 Excel 로 내보낼 때 width 가 작게 나올때 적용하는 두가지 방법 입니다.

1. 소스 코드 수정 하거나

gridView5.OptionsPrint.AutoWidth = false;

 

2. Run Designer 에서 수정 하거나 하시면 됩니다.

안녕하세요

현재 주식차트 그래프의 추세선을 이용해서 코인 예약 매매 시스템을 만들고 있습니다.
그래프 라이브러리 중에 plotly 를 찾아서 해보고 있는데 제가 원하는 그래프는 아닙니다..
더 좋은 그래프 라이브러리를 찾는다면 바꿔서 진행 할 예정입니다.

python plotly 와 dash 를 이용해서 아래 이미지 처럼 candlestick(stockchart) 나타나게 만들어 보았습니다.

python plotly

import plotly.graph_objects as go
import dash
import pymysql
import dash_core_components as dcc
import dash_html_components as html
# DB connect
def db_con():
db = pymysql.connect(
host='localhost',
user='id',
password='pw',
charset='utf8mb4',
database='db_name',
)
return db
# call data function
def graph(sbl, rod):
data = dict()
data['Open'] = list()
data['Close'] = list()
data['High'] = list()
data['Low'] = list()
name_list = list()
db = db_con()
sql = "select open, close, high, low, dt from chart where symbol = %s and rods = %s"
curs = db.cursor()
curs.execute(sql, (sbl, rod))
rows = curs.fetchall()
# +--------+------+---------------------+----------+----------+----------+----------+
# | symbol | rods | dt | open | close | high | low |
# +--------+------+---------------------+----------+----------+----------+----------+
# | ETHBTC | day1 | 2020-05-25 00:00:00 | 0.022568 | 0.022682 | 0.022755 | 0.02249 |
# | ETHBTC | day1 | 2020-05-26 00:00:00 | 0.022691 | 0.023111 | 0.023236 | 0.022631 |
# | ETHBTC | day1 | 2020-05-27 00:00:00 | 0.023111 | 0.022818 | 0.023136 | 0.02265 |
# | ETHBTC | day1 | 2020-05-28 00:00:00 | 0.022814 | 0.022463 | 0.023018 | 0.02246 |
# | ETHBTC | day1 | 2020-05-29 00:00:00 | 0.022466 | 0.02239 | 0.022675 | 0.022137 |
# | ETHBTC | day1 | 2020-05-30 00:00:00 | 0.022414 | 0.023276 | 0.023428 | 0.022414 |
# | ETHBTC | day1 | 2020-05-31 00:00:00 | 0.02328 | 0.024915 | 0.024955 | 0.02327 |
# | ETHBTC | day1 | 2020-06-01 00:00:00 | 0.024915 | 0.024686 | 0.025576 | 0.024597 |
# | ETHBTC | day1 | 2020-06-02 00:00:00 | 0.024689 | 0.025044 | 0.02525 | 0.024462 |
# | ETHBTC | day1 | 2020-06-03 00:00:00 | 0.025049 | 0.024446 | 0.025219 | 0.024 |
# +--------+------+---------------------+----------+----------+----------+----------+
for row in rows:
# y축의 값이지만 ochl 의 값을 표시 해야 하기 때문에 아래와 같이 만들어 준다
data['Open'].append(row[0])
data['Close'].append(row[1])
data['High'].append(row[2])
data['Low'].append(row[3])
# x축
name_list.append(row[4])
db.close()
return data, name_list
# call data
data, name_list = graph('ETHBTC', 'min5')
# make graph
fig = go.Figure(data=[go.Candlestick(x=name_list,
open=data['Open'], high=data['High'],
low=data['Low'], close=data['Close'],
name = 'ETHBTC')])
# css import
external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css']
# dash
app = dash.Dash(__name__, external_stylesheets=external_stylesheets)
# layout
app.layout = html.Div([
# dcc.Graph(figure=fig),
html.Div(
[
# 그래프 표시되기 전 로딩 표시
dcc.Loading(
id="loading-1",
# figure 의 값에 위에 만들어 놓은 그래프 fig
children=[html.Div(id='figure-container', children=[dcc.Graph(figure=fig)])],
type="circle"
),
],
),
])
# web server init
if __name__ == '__main__':
app.run_server(
port=8050,
host='0.0.0.0',
debug=False
)

 

+ Recent posts